Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within HTML Pages with CSS and JavaScript
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
HTML Pages with CSS and JavaScript
simple question but weird.
Edward Chen
Ranch Hand
Posts: 798
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
var i = 0;
myform['info.rates['+i+'].coupon'];
1. here, '+i+' , what is its meaning? so weird .
2. what is the rule using "" and ''? which is defined as standard? '' could include '' inside?
Thanks.
Bear Bibeault
Sheriff
Posts: 67746
173
I like...
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
1) It's just simple
string
concatentation. Perhaps if it were written:
'info.rates[' + i + '].coupon'
would it make more sense to you?
[
Asking smart questions
] [
About Bear
] [
Books by Bear
]
Bear Bibeault
Sheriff
Posts: 67746
173
I like...
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
2) Either double or single quotes can be used to delimit strings.
To use the same quote character inside the string as is used to delimit it, you need to escape the internal quote with the back-slash character. For example:
'I saw O\'Brien the other day'
[
Asking smart questions
] [
About Bear
] [
Books by Bear
]
Edward Chen
Ranch Hand
Posts: 798
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
thanks. I got it.
I'm doing laundry! Look how clean this tiny ad is:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
'==' operators with Wrapper class
package problem????
Weird dream
javascript:window.close() does not work with NN7.1
use of static method in web development
More...