通过javascript访问链接的地址 [英] access the address of link by javascript

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

问题描述

hi
我要访问链接的地址,以下脚本返回url的地址,我要访问用户单击的链接的地址,我以html格式的文件形式编写了此脚本,并在hkcu中创建了一个密钥软件\ microsoft \ internet资源管理器\ menuext \注册表示例项目

我将那个html文件的地址分配给那个key.ok?
当我单击Internet Explorer的上下文菜单中的示例项目"时,返回的是
url的地址,我想访问单击的链接的地址,这是什么脚本?
有人可以帮助我吗?

hi
i want to access the address of a link ,the following script return the address of url ,i want to access to the address of link the user clicked , i wrote this script in a file in html format and i created a key in hkcu\software\microsoft\internet explorer\menuext\sample item of registry

and i assign the address of that html file to that key.ok?
when i click to ''sample item'' in context menu of internet explorer it is return that
address of url , i want to access to the address of link i clicked , what script do this?
any one can help me?

<SCRIPT>
alert(external.menuArguments.document.URL);
</SCRIPT>

推荐答案



您想在浏览器中看到当前网址,然后使用此行.

Hi ,

You want see present url in browser thn use this line .

function f1() {
       alert(location.href);
   }



调用此方法以显示该网页的网址


一切顺利



call this method to show url of that webpage


All the best


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

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