地址栏? [英] addressbar?
问题描述
是否可以用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屋!