Read Javascript questions for interview with example


/ Published in: JavaScript

JavaScript is a client-side as well as server side scripting language that can be inserted into HTML pages and is understood by web browsers. JavaScript is also an Object based Programming language.
Example
Note: This is an example, you can change according to your self ,


Copy this code and paste it in your HTML
  1. <!DOCTYPE html>
  2. <html>
  3. <body>
  4.  
  5. <h2>What Can JavaScript Do?</h2>
  6.  
  7. <p id="demo">JavaScript can change HTML content.</p>
  8.  
  9. <button type="button" onclick='document.getElementById("demo").innerHTML = "Hello JavaScript!"'>Click Me!</button>
  10.  
  11. </body>
  12. </html>

URL: https://www.interviewqueries.com/javascript/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.