What is the disadvantage of using innerhtml in javascript?
Answer / Deepak Chaudhri
The main disadvantage of using innerHTML in JavaScript is that it can potentially lead to security vulnerabilities, as it allows execution of malicious code if the HTML string contains dangerous script tags (<script>). Additionally, manipulating the DOM directly with innerHTML can be less efficient compared to using more targeted methods like createElement and appendChild.
| Is This Answer Correct ? | 0 Yes | 0 No |
How to get checkbox status whether it is checked or not?
Which software is used for javascript?
How can a page be forced to load another page in javascript?
What is push() method in javascript?
how can we create own web browser?
what is the difference between window & document in javascript?
Why javascript is not secure?
What are the primitive data types in JavaScript?
What are self invoking functions?
Why extending array is bad idea?
write a program to generte a harmonic series 1+1/2+1/3+1/4+1/5 upto 15 terms.
What are the Advantages and Disadvantages of JavaScript?