如何删除超链接并将其替换为文本

问题描述:





删除超链接时遇到问题。



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



点击此处登录















请帮我解决

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