Why it is not advised to use innerhtml in javascript?
Answer / Gaurav Nidhar
Using innerHTML can pose security risks as it may allow cross-site scripting (XSS) attacks. It is recommended to use other methods like creating and manipulating DOM elements directly, or using libraries that provide sanitization functions.
| Is This Answer Correct ? | 0 Yes | 0 No |
What do “1”+2+4 evaluate to?
How to force a page to go to another page using javascript ?
What are nodes in javascript?
What is string in javascript?
What is the use of a set object in javascript?
What is the difference between call & apply?
What is the use of a weakset object in javascript?
What does parse Query String return in javascript?
What are a fixed-width table and its advantages in javascript?
how can we generate alert message without referashing page in asp.net with language vb.net and script use in java script .means with out referash the page message in java alert
What does 3 dots mean in javascript?
What is asynchronous javascript?