Javascript to add output to div
Alright, I have some javascript that pull the input from a form input (no submit button is used).
<scri开发者_开发百科pt type="text/javascript">
$("input#level").keyup(function () {
var value = $(this).val();
$("span#level-text").text(value);
}).keyup();
This then adds the content into a span clan. I would love to take this input and then add it to another div (#test). I guess I basically need to take two numbers (two different inputs), and add them together and have the new added number out put to another div (all without a submit)
Assuming you are asking to take two inputs place each those values in a span and also add their values together in another div. You would do something like this: JSFiddle Example
精彩评论