阅读:2837回复:3
关于图片无法正常显示的问题
各位大大帮忙看看,你们用ff浏览以下网址的时候,图片能不能正常打开。
我一直在这个网站看小说,这个网站经常把小说设置成图片格式,我用火狐不能正常显示,用IE或者opera就可以了,是不是还是因为这个网站不太支持火狐? http://www.tfwx.net/c7/18511/3049.html |
|
1楼#
发布于:2008-05-05 15:19
网站在脚本控制台有很多类似下面的错误,应该是问题的原因。
Warning: Element referenced by ID/NAME in the global scope. Use W3C standard document.getElementById() instead. Source File: http://www.tfwx.net/c7/18511/3049.html Line: 51 网站中图片链接http://www.tfwx.net/c7/18511/%5Bws_host%5D/upload_admin/200851/200855134217408.gif是无效,在ie中可以显示的是http://58.215.87.56/upload_admin/200851/200855134217408.gif,应该是某个脚本执行的结果,但这个脚本在火狐下运行不正常。 所以这是一个ie-only的站点,不过从它的错误原因来看可以写一个greasemonkey脚本来修正它。 |
|
2楼#
发布于:2008-05-05 15:19
这是脚本,你可以在状态栏GreaseMonkey图标上右击,选择新建用户脚本,记得在Includes(包含页面)中输入http://www.tfwx.net/*,让后确定在弹出的编辑器中将下面的代码输入,保存,在进入tfwx.net网站应该就可以看到图片文字了,我已测试过了。
// ==UserScript== // @name fix image for tfwx.net // @namespace bob.zhong // @include http://www.tfwx.net/c7/18511/3049.html // @include http://www.tfwx.net/* // ==/UserScript== function doscript() { for(var i=0; i<document.images.length; i++){ var index = document.images.src.indexOf('upload_admin'); if (index != -1) { document.images.src = "http://58.215.87.56/" + document.images.src.substring(index); } } } window.addEventListener("load", function() { doscript() }, false); |
|
3楼#
发布于:2008-05-05 15:19
呵呵,谢谢大大了。。。感觉比较麻烦,先研究下好了。。
|
|