地址栏? [英] addressbar?

查看:76
本文介绍了地址栏?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




是否可以用javascript读出地址栏,或者我必须使用php来支付
吗?

谢谢!


-

roN
www.rideon.ch

解决方案

您要阅读当前的URL吗?使用document.location


gobera写道:

你想阅读当前的URL吗?使用document.location



yup,hm,document.location ....确实返回实际域名?喜欢
www.google.com/index.htm?

-

roN
www.rideon.ch


" Ron Eggler" < NO **** @ hotmail.com>在消息中写道

news:3e ************ @ individual.net ...

gobera写道:

您想阅读当前的网址吗?使用document.location


是的,hm,document.location ....确实返回实际域名吗?喜欢
www.google.com/index.htm?




它是window.location.href(或只是位置。 HREF)。为什么不试试呢:


< script type =" text / javascript">

alert(window.location.href);

< / script>


有关Location对象的更多信息:< url:
http://docs.sun.com/source/816-6408-10/location.htm />


-

Grant Wagner< gw ***** @ agricoreunited.com>

comp。 lang.javascript常见问题 - http://jibbering.com/faq


Hi,

is it possible to read out the Addressbar with javascript or do I have to
use php for it?
Thank you!

--
roN
www.rideon.ch

解决方案

Do you want to read the current URL? Use document.location


gobera wrote:

Do you want to read the current URL? Use document.location


yup, hm, document.location.... does return the actual domain? like
www.google.com/index.htm?

--
roN
www.rideon.ch


"Ron Eggler" <NO****@hotmail.com> wrote in message
news:3e************@individual.net...

gobera wrote:

Do you want to read the current URL? Use document.location


yup, hm, document.location.... does return the actual domain? like
www.google.com/index.htm?



It''s window.location.href (or simply location.href). And why not try it:

<script type="text/javascript">
alert(window.location.href);
</script>

More about the Location object: <url:
http://docs.sun.com/source/816-6408-10/location.htm />

--
Grant Wagner <gw*****@agricoreunited.com>
comp.lang.javascript FAQ - http://jibbering.com/faq


这篇关于地址栏?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆