I am new to JQuery and i am looking for a script which fulfills the below need.
User has to type a number input in the textbox say:456 (Can be input of any length) the value has to change to 000000000000000456 (length has to be 18 with zeros appended in front of the user input).
Eg: 12 has to change to 000000000000000012
145 has to change to 000000000000000145
Function has to be invoked on click of button. Below is the snippet:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<title></title>
<script type="text/javascript" src="js/jquery-1.6.2.min.js"></script>
<script>
$(document).ready(function () {
$("#acb1").click(function () {
});
});
</script>
</head>
<body>
<form id="form1">
<div>
<input type="text" id="ac1" value=""/>
<input type="button" id="acb1" value="Search" />
</div>
</form>
</body>
</html>
Any leads would be appreciated.
Thanks