function getparastr(strname)
  {
   var hrefstr,pos,parastr,para,tempstr;
   hrefstr = window.location.href;
   pos = hrefstr.indexOf("?")
   parastr = hrefstr.substring(pos+1);
   para = parastr.split("&");
   tempstr="";
   for(i=0;i<para.length;i++)
   {
    tempstr = para[i];
    pos = tempstr.indexOf("=");
    if(tempstr.substring(0,pos) == strname)
    {
     return tempstr.substring(pos+1);
     }
   }
   return null;
  }
// 获取program参数
var programstr = getparastr("program");
document.write(programstr);
  

相关文章:

  • 2021-08-14
  • 2021-12-17
  • 2022-12-23
  • 2021-09-10
猜你喜欢
  • 2022-01-15
  • 2021-10-21
  • 2021-10-02
  • 2022-02-17
  • 2021-12-22
  • 2021-10-24
  • 2021-06-01
相关资源
相似解决方案