Skip to content
Update JQuery authored by Joel H's avatar Joel H
...@@ -39,6 +39,7 @@ $('div.test'); //will find every div with class 'test' ...@@ -39,6 +39,7 @@ $('div.test'); //will find every div with class 'test'
//In a DOM object, use text or html to change texts. //In a DOM object, use text or html to change texts.
$('body').text("Hello world!"); //equivalent of innerText $('body').text("Hello world!"); //equivalent of innerText
$('body').html("Hello world!"); //equivalent of innerHTML $('body').html("Hello world!"); //equivalent of innerHTML
$('input').val(); //to get the value of an input element
``` ```
```javascript ```javascript
... ...
......