Javascript: Difference between revisions

Jump to navigation Jump to search
501 bytes added ,  8 July 2013
no edit summary
No edit summary
Line 12: Line 12:
* Using jQuery [http://api.jquery.com/html/ .html()]<ref>[http://stackoverflow.com/questions/3563107/jquery-html-vs-innerhtml javascript - JQuery html() vs. innerHTML - Stack Overflow]</ref> <nowiki>$("#selected_id").html(htmlStr);</nowiki>
* Using jQuery [http://api.jquery.com/html/ .html()]<ref>[http://stackoverflow.com/questions/3563107/jquery-html-vs-innerhtml javascript - JQuery html() vs. innerHTML - Stack Overflow]</ref> <nowiki>$("#selected_id").html(htmlStr);</nowiki>
* [http://www.w3schools.com/js/js_htmldom_html.asp JavaScript HTML DOM Changing HTML Content] <nowiki>document.getElementById(selected_id).innerHTML = htmlStr;</nowiki> {{exclaim}} I met technical issue to replace the select text in {{IE}} v.8
* [http://www.w3schools.com/js/js_htmldom_html.asp JavaScript HTML DOM Changing HTML Content] <nowiki>document.getElementById(selected_id).innerHTML = htmlStr;</nowiki> {{exclaim}} I met technical issue to replace the select text in {{IE}} v.8
== input selector ==
* jQuery [http://api.jquery.com/input-selector/ :input Selector] "Selects all input box, textarea, select and button elements" Cited from [http://api.jquery.com/input-selector/ :input Selector]
* jQuery <nowiki>$("form#formID input[type=text]")</nowiki> Selects all input box belonging to the form with id: formID<ref>[http://stackoverflow.com/questions/4291005/jquery-get-all-input-from-specific-form javascript - jquery get all input from specific form - Stack Overflow]</ref>


== Create HTML select option ==
== Create HTML select option ==

Navigation menu