Get Content - text(), html(), and val() :
text() - Sets or returns the text content of selected elements
html() - Sets or returns the content of selected elements (including HTML markup)
val() - Sets or returns the value of form fields
$("#test").text();

Set Content - text(), html(), and val()
text() - Sets or returns the text content of selected elements
html() - Sets or returns the content of selected elements (including HTML markup)
val() - Sets or returns the value of form fields
$("#test1").text("Hello world!");

Add Two Numbers Together

input[type='number']{ width: 4em; background-color:yellow; } function myFunction() { xa=$("#myAA").val(); xb=$("#myBB").val(); zc= parseInt(xa) + parseInt(xb); $("#myResult").val(zc); } $(document).ready(function(){ //alert("here"); $("#myAdder").click(function(){ alert("here2"); xa=$("#myAA").val(); xb=$("#myBB").val(); zc= parseInt(xa) + parseInt(xb); $("#myResult").val(zc); }); myFunction(); //xa=$("#myAA").val(); //xb=$("#myBB").val(); //zc= parseInt(xa) + parseInt(xb); //alert("here"); //alert(xa); //alert(xb); //alert(zc); $("#myResult").val(zc); //$("#myAA").val(5); });

Change the "First #" and/or the "Second #"
and Click the "Calculate" Button

+   
=



Feature Three

Lorem ipsum dolor sit amet, consectetur adip iscing elit, sed do eiusmod tempor incididunt.

Leave a Comment

Shopping Cart