Jun 23

Javascript: 返回URL中的GET请求字符串 不指定

felix021 @ 2008-6-23 16:12 [IT » 网络] 评论(0) , 引用(0) , 阅读(4784) | Via 本站原创 | |
比如打开的文件是http://19880711.com/blog/read.php?987,那么返回一个字符串为"?987"
代码如下:
<script language="javascript">
function getRequestString(){
  var url=window.location+"";
  url=url.substr(url.indexOf("?"));
  if(url==window.location)url="";
  return url;
}
</script>




欢迎扫码关注:




转载请注明出自 ,如是转载文则注明原出处,谢谢:)
RSS订阅地址: https://www.felix021.com/blog/feed.php
Tags:
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   *非必须
网址   电邮   [注册]