In the code below lines one and four are the old manual way I did things. If I needed the value or the text of the option to be a JavaScript variable, I had to start concatenating the strings. This is a bit easier with lines two and five.
Also note, in the programmatic way if you need to insert HTML entities you have to use the html function instead of the text function.
No comments:
Post a Comment