Desperately in need of some help. Very lost in my first dabble in javascript. I have a script which runs a function on a id number. Problem in the script has come with an id number inside, and i am trying to get the id number to be submitted from another page via a form. How is it possible to get a form setup to fill [var id=""] and run the function on the submitted id number? Last part of the script looks like this: (last two lines is where the variable (id number) is) function checkId(pId){ var arrVerifyCode = [1,0,"x",9,8,7,6,5,4,3,2]; var Wi = [7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2]; var Checker = [1,9,8,7,6,5,4,3,2,1,1]; if(pId.length != 15 && pId.length != 18) return "身份è¯å·å…±æœ‰ 15 ç æˆ–18ä½"; var Ai=pId.length==18?pId.substring(0,17)Id.slice(0,6)+"19"+pId.slice(6,16); if (!/^\d+$/.test(Ai)) return "身份è¯é™¤æœ€åŽä¸€ä½å¤–,必须为数å—ï¼"; var yyyy=Ai.slice(6,10),mm=Ai.slice(10,12)-1,dd=Ai.slice(12,14); var d=new Date(yyyy,mm,dd),year=d.getFullYear(),mon=d.getMonth(),day=d.getDate(),now=new Date(); if (year!=yyyy || mon!=mm || day!=dd || d>now || now.getFullYear()-year>140) return "身份è¯è¾“入错误ï¼"; for(var i=0,ret=0;i<17;i++) ret+=Ai.charAt(i)*Wi; Ai+=arrVerifyCode[ret %=11]; return pId.length ==18 && pId.toLowerCase() != Ai?"身份è¯è¾“入错误ï¼":Ai; }; function getInfo(id){ //æ ¹æ®èº«ä»½è¯å– çœä»½,生日,性别 Go_Rush(阿舜) id=checkId(id) if (isNaN(id)) return "错误的身份è¯å·ç " var id=String(id),sex=id.slice(14,17)%2?"ç”·":"女" prov=areaCode[id.slice(0,6)] || areaCode[id.slice(0,4)] || areaCode[id.slice(0,2)] || "æ— æ³•ç¡®å®š" var birthday=(new Date(id.slice(6,10),id.slice(10,12)-1,id.slice(12,14))).toLocaleDateString() return [prov,birthday,sex] } var id="440602740328126" alert(getInfo(id))