就像当前的网址:http://community.csdn.net/Expert/topic/4999/4999340.xml?temp=.8769953

解决方案 »

  1.   

    document.URL
    还有一些其他的方法
      

  2.   

    取页面传递的参数都可以。
    <SCRIPT LANGUAGE="JavaScript"> 
    <!-- 
    // if uri parameter which is "?u=never-online.net&l=BlueDestiny"; 
    // scripting by never-online 
    // blog.csdn.net/blueDestiny var request = { 
    QueryString : function(val) { 
    var uri = window.location.search; 
    var re = new RegExp("" +val+ "=([^&?]*)", "ig"); 
    return ((uri.match(re))?(uri.match(re)[0].substr(val.length+1)):null); 

    } // so, You can using request.QueryString(para), like this 
    var u = request.QueryString("u"); 
    var l = request.QueryString("l"); document.writeln("Hello! " + u); //--> 
    </SCRIPT>