Hi.
I want to know How is this possible to do?
I want to know how can I change the specific dive id tag in my HTML file using the javascript? This should rewrite the function dynamically.
Thanks in advance.
Hi.
I want to know How is this possible to do?
I want to know how can I change the specific dive id tag in my HTML file using the javascript? This should rewrite the function dynamically.
Thanks in advance.
JavaScript is a dynamic language. A *very* dynamic language. You can do anything, any time.
Here is some example code I've found... does anyone have a better way?
Code:function include(url) { var s = document.createElement("script"); s.setAttribute("type", "text/javascript"); s.setAttribute("src", url); var nodes = document.getElementsByTagName("*"); var node = nodes[nodes.length -1].parentNode; node.appendChild(s); }
Executing above code will alert “Child function called”. So, javascript also creates a variable called child.Code:[source:javascript] function parent() { function child() { alert(”Child function called”); } // Assign the function to a variable var childFunction = child; childFunction(); } parent(); [/source]
To know Javascript in detail.
Bookmarks