Javascript Onclick Functions Do Not Work
&l
Solution 1:
The problem here is that using document.write
apparently overwrites JavaScript as well. If you switch your document.write()
to document.body.innerHTML +=
your problem is solved. Your latter two buttons won't work with that code because you are calling button 0
and 1
exclusively, while those second two are 3
and 4
.
Solution 2:
quick googling suggests that the problem is that you are using document.write after the page has been loaded so it is erasing the dom as well. you should avoid using that in functions that are called after page loading.
source : http://sitr.us/2012/09/04/monkey-patching-document-write.html
I dont have IE so couldn't test it.
Post a Comment for "Javascript Onclick Functions Do Not Work"