asp 获取当前url变量赋值给x

来源:百度知道 编辑:UC知道 时间:2024/05/27 01:59:36
获取当前url和标题,然后url和标题不显示在页面上,并直接赋值给变量a和b,
像<%=a%><%=b%>就能显示在页面上,

要asp代码 谢谢各位

参考代码如下
<script>
thisURL = document.URL;
strwrite = thisURL
document.write(strwrite);
</script>
这样的话,把url直接显示在网页上了,还没有获取标题

我是新手,帮帮忙啦。。。

网站的标题动态是不好获取的,

URL =Request.ServerVariables("url")

不过标题可以通过js来获取,


<title>这里是网站标题,我要取出来显示</title>
<script>
var Title=document.all.tags("title")[0].innerHTML;
alert(Title);
</script>

a=Request.QueryString

用表单提交
然后获取