如何从超链接获取URL [英] How to get urls from hyperlinks
本文介绍了如何从超链接获取URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,我是一个使用Javascript的初学者,我想知道如何在变量中获取超链接的url?我想做一些像mozilla(不是吧)状态栏的东西,但只要获取网址,无论超链接的扩展名(.html,.php,.pdf等)。所以,我需要你的帮助:)。谢谢
Hi everybody, I''m a total beginner using Javascript and I would like to know how can I get in a variable the url of hyperlinks? I want to do something like a status bar of mozilla (not a bar) but just get the urls no matter the extension of the hyperlinks (.html, .php, .pdf, etc). So please I need your help :) . Thanks
推荐答案
大家好,我只是一个使用Javascript的初学者,我想知道我怎么能得到在变量中超链接的url?我想做一些像mozilla(不是吧)状态栏的东西,但只要获取网址,无论超链接的扩展名(.html,.php,.pdf等)。所以,我需要你的帮助:)。谢谢
Hi everybody, I just a total beginner using Javascript and I would like ti know how can I get in a variable the url of hyperlinks? I want to do something like a status bar of mozilla (not a bar) but just get the urls no matter the extension of the hyperlinks (.html, .php, .pdf, etc). So please I need your help :) . Thanks
欢迎来到TSDN!
有一个标签的属性href。
试着访问这个。
有一个例子。
Welcome to TSDN!
There is an attribute href of a Tag.
Try to access this.
Have an example.
展开 | 选择 | Wrap | 行号
谢谢,但是我说我是初学者(呵呵呵)所以我的下一个问题是我在哪里可以尝试一下? XD。
Thank you, but as I say I''m a total beginner (hehehe) so my next question is where can I try it? XD.
谢谢你,但正如我说我是初学者(呵呵呵)所以我的下一个问题是我在哪里可以尝试它? XD。
Thank you, but as I say I''m a total beginner (hehehe) so my next question is where can I try it? XD.
HTML页面上包含所有< a>名称为links的标签
on a HTML page with all the <a> tags with the name "links"
这篇关于如何从超链接获取URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文