简体   繁体   English

如何使用html或javascript禁用特定链接

[英]How to Disable a specific link using html or javascript

I am using a Gchat voice and video chat script. 我正在使用Gchat语音和视频聊天脚本。 link to my website 链接到我的网站

The problem is that someone login in my chatroom and he use this flash link to crash users browser. 问题是有人登录我的聊天室,他使用此Flash 链接使用户浏览器崩溃。

when he login all of us get disconnected and we have a blank black page at that time. 当他登录时,我们所有人都断开了连接,那时我们有一个空白的黑页。

He must be using src="http://best-hosting.cu.cc/c/banner3-www-facebook-skype-net-com.swf" or iframe of that link somewhere when he is logging in. 登录时,他必须在某处使用src="http://best-hosting.cu.cc/c/banner3-www-facebook-skype-net-com.swf"或该链接的iframe。

Please help me. 请帮我。 How can I disable that flash thing not to load in all users browsers 如何禁用该Flash内容,使其无法在所有用户浏览器中加载

I get his links detect using ads block plus extension in firefox when he login with that flash link thing. 当他使用Flash链接登录时,我得到了他的链接使用firefox中的ads block和extension进行检测。 when i block his link in ads block plus then i do not get disconnect but the other users who dont have ads block plus still get disconnect from website and have a blank black page. 当我在广告屏蔽中加上他的链接时,我没有断开连接,但其他没有广告屏蔽的用户仍然与网站断开连接,并且有一个空白的黑页。

Please suggest me something that will solve my problem. 请建议我一些可以解决我问题的方法。

You could try the accepted answer here: Find text and remove it jquery 您可以在此处尝试接受的答案: 查找文本并将其删除

Use it to find a string within the text and remove the entire thing. 用它在文本中查找字符串并删除整个内容。

I'd personally do: $('.className').contains('.swf').remove();​ 我亲自做: $('.className').contains('.swf').remove();​

Where className would be the class for links, or you could just do it for the <a> tag in general 其中className是链接的类,或者您通常可以对<a>标记进行操作

EDIT: That being said, I have no idea what Gchat is, and whether or not this would be possible with it. 编辑:话虽如此,我不知道Gchat是什么,以及它是否有可能。 If it is something hosted on your site it should work, but if it is embedded and hosted elsewhere, I'm not quite sure, worth a try though. 如果它是在您的站点上托管的,则应该可以运行,但是,如果它是嵌入式和托管在其他位置,则我不确定,值得一试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM