通过js绑定键盘按下事件onkeydown获取每个按键的ascII值. js获取每个按键的ascii值 <script language="javascript"> //获取每个按键的值 function keyDown() { var keycode=event.keyCode; var keychar=String.fromCharCode(keycode); console.log('ASCII='+keycode+'\nKeyChar='+keychar); } d…
js获取url的参数和值的N种有效方法 function getParameterByName(name) { name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]"); var regexS = "[\\?&]" + name + "=([^&#]*)"; var regex = new RegExp(regexS); var results =…