javascript输入CD-KEY自动分割的代码 时间:2020-05-12 人气:0 输入CD-KEY自动分割 <script language="JavaScript" type="text/javascript"> function cdkeyInput(thisobj) { objResult = ""; nextObjResult = ""; if(thisobj.value.indexOf('-') > 0) { objResult = thisobj.value.substring(0,thisobj.value.indexOf('-')); nextObjResult = thisobj.value.substring(thisobj.value.indexOf('-')+1); thisobj.value = objResult.substring(0,thisobj.attributes["max"].nodeValue); if(arguments[1] != undefined && arguments[1] != null) { next = arguments[1]; nextobj = document.getElementById(next); nextobj.value = nextObjResult.toUpperCase(); nextobj.onkeyup(); } } thisobj.value = thisobj.value.toUpperCase(); } </script> - - - - - [Ctrl+A 全选 注:如需引入外部Js需刷新才能执行] 加载全部内容