Tag Archives: document.location.href

HTML页面之间的参数传递的局限性

动态网页传递参数比较简单,如果想在HTML之间传递参数就需要一点技巧,摘录两种方法如下: 采用字符串解析的: /* *函数功能:从href获得参数 *sHref:   http://www.cscenter.com.cn/arg.htm?arg1=d&arg2=re *sArgName:arg1, arg2 *return:  the value of arg. d, re */ function GetArgsFromHref(sArgName) {      var sHref= document.location.href;     var args  = sHref.split("?");     var retval = "";     if(args[0] == sHref) /*参数为空*/     { … Continue reading

Posted in Jeebook, 软件技术 | Tagged , , | Leave a comment