<script type="text/javascript">
function wenben() {
var inputdiv=document.getElementById("input22").value;
var aa=inputdiv.replace(/\s+/g,"");
alert(aa);
return false;
}
</script>
<input type="text" id="input22" />
<input type="button" οnclick="return wenben()" value="添加" />
function wenben() {
var inputdiv=document.getElementById("input22").value;
var aa=inputdiv.replace(/\s+/g,"");
alert(aa);
return false;
}
</script>
<input type="text" id="input22" />
<input type="button" οnclick="return wenben()" value="添加" />