javascript - how can i automatically calculate an expression from a text field -
how can automatically calculate expression text field .. there function or thing ..
<input type="text" value="3+4" id="txt"> var result = function_in_javascript(document.getelementbyid("txt").value) alert(result )// 7
try eval(document.getelementbyid("txt").value)
edit: though?
Comments
Post a Comment