久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      javascript 獲取url參數(shù)的正則表達式(用來獲取某個參數(shù)值)

      例子:
      //javascript傳參數(shù)(多個)
      var url = “B.aspx?txtA=”+document.getElementById(“txtName”).value;
      url +=”&txtB=”+document.getElementById(“txtAge”).value;
      window.open(url,’xWindow’,’width=640,height=400,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=no,top=250,left=430′);
      //B.aspx目標頁取得

      復制代碼 代碼如下:
      <scirpt language=’javascirpt’>
      <!–
      function GetStringValue()
      {
      String.prototype.getQueryString = function(name)//name 是URL的參數(shù)名字
      {
      var reg = new RegExp(“(^|&|\?)”+ name +”=([^&]*)(&|$)”), r;
      if (r=this.match(reg)) return unescape(r[2]); return null;
      };
      //直接可以傳參數(shù)名 就可以 得到參數(shù)的值
      alert(window.location.href.getQueryString(“txtA”)+window.location.href.getQueryString(“txtB”));
      }
      –>
      </scirpt>

      window.open和 window.location區(qū)別:
      window.open是打開新窗口
      window.location是將本頁替換了,也就是定位
      onclick=”javascript:window.location.href=’XXXX.aspx’;”
      JavaScript URL參數(shù)讀取改進版
      //www.jb51.net/article/17116.htm

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號-2    滬公網(wǎng)安備31011702889846號