JavaScript
JavaScript
1. What is the difference between [ ] and { } in Java script
Ans: in Java script arrays are written in square brakcets([ ]) , and java script objects are written with in curly braces ({ }).
2. What are the different java script frameworks ?
Ans: Angualr Js 2 and 1.x, Node.js, React Js, Meteor.js, Ember.js, Mithril.js, Polymor.js
3. How to change inner Element by using java script
<p id="demo">JavaScript can change HTML content.</p>
<button type="button" onclick='document.getElementById("demo").innerHTML = "Hello JavaScript!"'>Click Me!</button>
here when we click on Click Me, it will change the paragraph by "Hello Java script". here the identifier is paragraph id
java script can accept "" and ''
4. How to change font and style of innerHtml of a paragraph
<p id="demo">JavaScript can change the style of an HTML element.</p>
<button type="button" onclick="document.getElementById('demo').style.fontSize='35px'">Click Me!</button>
5. How to display style None
<p id="demo">JavaScript can hide HTML elements.</p>
<button type="button" onclick="document.getElementById('demo').style.display='none'">Click Me!</button>
1. What is the difference between [ ] and { } in Java script
Ans: in Java script arrays are written in square brakcets([ ]) , and java script objects are written with in curly braces ({ }).
2. What are the different java script frameworks ?
Ans: Angualr Js 2 and 1.x, Node.js, React Js, Meteor.js, Ember.js, Mithril.js, Polymor.js
3. How to change inner Element by using java script
<p id="demo">JavaScript can change HTML content.</p>
<button type="button" onclick='document.getElementById("demo").innerHTML = "Hello JavaScript!"'>Click Me!</button>
here when we click on Click Me, it will change the paragraph by "Hello Java script". here the identifier is paragraph id
java script can accept "" and ''
4. How to change font and style of innerHtml of a paragraph
<p id="demo">JavaScript can change the style of an HTML element.</p>
<button type="button" onclick="document.getElementById('demo').style.fontSize='35px'">Click Me!</button>
5. How to display style None
<p id="demo">JavaScript can hide HTML elements.</p>
<button type="button" onclick="document.getElementById('demo').style.display='none'">Click Me!</button>
Comments
Post a Comment