パラメータ値のURLのhtmlを取得JS

関数getUrlParameter(名){ 
        名前 = name.replace(/ [] /、 "\ [")。。(/ [] /、 "\ [")置き換える置き換える(/ [] /、 "\\\]" ;
        VaRの regexS = "[?\\&]" +名+ "=([^&#] *)" ;
        VaRの正規表現= 新しい正規表現(regexS)。
        VaRの結果= regex.exec(window.parent.location.href)。
        もし(結果== nullのリターン ""; {
             戻り結果[1 ]。
        } 
    }。
http:// localhostを:?8080 / PCMS / moduleApp / indexControl.html conferId = 117 

VAR conferid = getUrlParameter( 'conferIdを');

 

おすすめ

転載: www.cnblogs.com/penghq/p/11482287.html