$(function () { $("#btn1").click(function () { var id1 = $("#text1").val(); }); });
<!DOCTYPE html><html><head><script>"use strict";function byId(e){return document.getElementById(e);}window.addEventListener('load', onDocLoaded, false);function onDocLoaded(){ byId('dblBtn').addEventListener('click', onDblBtnClick, false);}function onDblBtnClick(evt){ var val = byId('numInput').value * 2; alert(val);}</script><style></style></head><body> <input type='number' min='0' max='10' value='5' id='numInput'/><button id='dblBtn'>x 2</button></body></html>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)