标签:price create test 页面 events lse check color 中文
<input type = "text" name= "number" id = ‘number‘ onkeyup="this.value=this.value.replace(/[^\d]/g,‘‘)" />
<input type = "text" name= "price" id = ‘price‘ onkeyup="this.value=this.value.replace(/[^0-9/.]/g,‘‘)" />
value=value.replace(/[^\w\.\/]/ig,‘‘)
function checknum(obj) { if(/^\d+\.?\d{0,1}$/.test(obj.value)){ obj.value = obj.value; }else{ obj.value = obj.value.substring(0,obj.value.length-1); } }
var evt; if (document.createEvent) { evt = document.createEvent("MouseEvents"); evt.initMouseEvent("change", true, true, window, 0, 0, 0, 0, 0,false, false, false, false, 0, null); document.getElementById("textarea").dispatchEvent(evt); } else if (document.getElementById("textarea").fireEvent) { document.getElementById("textarea").fireEvent(‘change‘); }
标签:price create test 页面 events lse check color 中文
原文地址:https://www.cnblogs.com/cglmj/p/10923275.html