如何删除超链接并将其替换为文本 [英] How to remove a Hyperlink and replace that with a text

查看:124
本文介绍了如何删除超链接并将其替换为文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





删除超链接时遇到问题。



我需要删除下面的超链接是动态出现的,需要用文本替换。



点击此处登录















请帮我解决

Hi,

I have a problem in removing a hyperlink .

I need to remove the below hyperlink which is coming dynamically ,and need to replace with a text.

Click here to login







Please help me out

推荐答案

我认为您可以使用js删除超链接的属性href,或者添加带有display = none的标签,如果要显示文本,可以将标签的显示更改为阻止,并将超链接更改为无。



更多:您可以使用正则表达式删除并替换标签或文本的超链接:D



by Wengdeli
I think you can use js to remove attribute href of hyperlink , or you add a label with display=none , if you want show text , you can change display of label to block and hyperlink to none.

more : you can use regex to remove and replace hyperlink to label or text :D

by Wengdeli


创建如下的css类

create css class like below
.text
{
text-decoration:none;
}



并在动态创建时将此类应用于ahref标签。

希望这有助于


and apply this class to ahref tag when dynamically create.
Hope this helps


这篇关于如何删除超链接并将其替换为文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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