<script language="javascript"><!--function request(strname){var strhref = "www.abc.com/index.htm?a=1&b=1&c=测试测试";var intpos = strhref.indexof("?");var strright = strhref.substr(intpos + 1);
var arrtmp = strright.split("&");for(var i = 0; i < arrtmp.length; i++){var arrtemp = arrtmp[i].split("=");
if(arrtemp[0].touppercase() == strname.touppercase()) return arrtemp[1];}return "";}
alert(request("a"));alert(request("b"));alert(request("c"));//--></script>
<script>string.prototype.getquery = function(name){ var reg = new regexp("(^|&)"+ name +"=([^&]*)(&|$)"); var r = this.substr(this.indexof("\?")+1).match(reg); if (r!=null) return unescape(r[2]); return null;}var str ="www.abc.com/index.htm?a=1&b=1&c=测试测试";alert(str.getquery("a"));alert(str.getquery("b"));alert(str.getquery("c"));</script>