0. Only the number is allowed (code intercept from a shopping cart) Function Reginput (Obj, Reg, InputStr) {var Docsel = document.selection.createRAnge () c (Docsel.Parentelement (). Tagname! = "Input") Return false oSel = docSel.duplicate () oSel.text = "" var srcRange = obj.createTextRange () oSel.setEndPoint ( "StartToStart", srcRange) var str = oSel.text inputStr srcRange.text.substr (oSel.text Return reg.test (str)}
1. οncοntextMenu = "window.event.ReturnValue = false" will thoroughly shield the mouse button