标签:
<script language="javascript" type="text/javascript">
function getNum(text){
var value = /\d+/.exec(text);
//var value = text.replace(/^[0-9]/,"");
alert(value);
}
</script>
<input type="text" id="btn_getNum"/>
<input type="button" value="得到数字" onclick="getNum(btn_getNum.value);"/>
标签:
原文地址:http://www.cnblogs.com/baby-bear/p/4642138.html