pppguest3962
狐狸大王
狐狸大王
  • UID26872
  • 注册日期2008-11-01
  • 最后登录2023-08-16
  • 发帖数343
  • 经验158枚
  • 威望0点
  • 贡献值236点
  • 好评度5点
阅读:2186回复:3

IEview保存下来的的页面,是否有方法可让FF顺利观看?(除了利用IE Tab扩展之外?)

楼主#
更多 发布于:2009-11-22 17:41
IEView保存下来的html,页面估计是有一些JavaScript的原因,FF打开就是空白页面...
有办法让FF正常运行他们吗?

这是html节选,是Miranda IM+QQ插件在IEView情况下保存的...

深层次的修改我可以写个处理去批量自动替换他们,这个要麻烦大大们指出是代码哪个地方only for IE,而FF要如何如何才能正确显示了...
希望结果是FF能正常显示出他们,用方法....

感激不尽!!!!


<html>
<head>
<base href="file://D:/Work/MirandaQQ/Plugins/ieview/satin/">
<link rel="stylesheet" type="text/css" href="main.css" />
<link rel="stylesheet" type="text/css" href="greenblueorange.css" />
<script language="Javascript" src="scripts.js"></script>
</head>
<body style="text-align:center;">
<script type="text/javascript">endGroupMsg();</script>
		<table width="100%" class="nameheader" cellspacing="0" cellpadding="0">
			<tr>
				<td class="namein">(QQ qun) 一群饭桶</td>
				<td class="protocolin">Buddy</td>
			</tr>
		</table>
		<table style="margin-bottom:10px;" width="100%" class="msgheader" cellspacing="0" cellpadding="0">
			<tr>
				<td class="bicon"><img height="30" width="30" src="D:/Work/MirandaQQ/QQ/4C442638DF63C7BDBC8BFDC7EC6C2823.bmp" /></td>
				<td class="message">
					<table class="msgtable" cellspacing="0" cellpadding="0" height="50" width="100%">
						<tr>
							<td class="leftbg" rowspan="4"><img src="images/message/message_top_left.png" /></td>
							<td colspan="1" class="topbg">&nbsp;</td>
							<td rowspan="4" class="rightbg"><img src="images/message/message_top_right.png" /></td>
						</tr>
						<tr>
							<td id="message_current" colspan="1"></td>
						</tr>
						<tr>
							<td style="font-size:20px;">&nbsp;</td>
						</tr>
					</table>
				</td>
			</tr>
		</table>
<div id="msg_new_grouped" style="display:none;">
							<table width="100%" cellspacing="0" cellpadding="0">
								<tr>
									<td style="border-top:0px;" class="nextmsg">
									饭桶一号 ():<br><font color ="ff0000"><span style="font-size: 21;">刚刚回来</span></font>&nbsp;
									</td>
									<td style="border-top:0px;" class="nextmsgtime">
									&nbsp;17:31:58
									</td>
								</tr>
							</table>
</div>
<script type="text/javascript">appendGroupMsg();</script>
<div id="msg_new_grouped" style="display:none;">
							<table width="100%" cellspacing="0" cellpadding="0">
								<tr>
									<td class="nextmsg">
									小节 ():<br><font color ="ff8000"><span style="font-size: 14;">專心啊</span></font>&nbsp;
									</td>
									<td class="nextmsgtime">
									&nbsp;17:32:00
									</td>
								</tr>
							</table>
</div>
<script type="text/javascript">appendGroupMsg();</script>
<div id="msg_new_grouped" style="display:none;">
							<table width="100%" cellspacing="0" cellpadding="0">
								<tr>
									<td class="nextmsg">
									Ghost ():<br><font color ="8000ff"><b><span style="font-size: 18;"><div style="width: 100%; border: 0; overflow: hidden;"><img class="img" style="width: expression((maxw = this.parentNode.offsetWidth ) > this.width ? 'auto' : maxw);" src="http://127.0.0.1:170/qunimage/{DEB65F5E-57E8-1C2D-AB38-466E7328D0F1}.jpg" /></div></span></b></font>&nbsp;
									</td>
									<td class="nextmsgtime">
									&nbsp;17:32:15
									</td>
								</tr>
							</table>
</div>
<script type="text/javascript">appendGroupMsg();</script>
pppguest3962
狐狸大王
狐狸大王
  • UID26872
  • 注册日期2008-11-01
  • 最后登录2023-08-16
  • 发帖数343
  • 经验158枚
  • 威望0点
  • 贡献值236点
  • 好评度5点
1楼#
发布于:2009-11-22 17:41
顶一顶,谢谢各位看官
hzhbest
千年狐狸
千年狐狸
  • UID22640
  • 注册日期2008-01-15
  • 最后登录2017-04-06
  • 发帖数1763
  • 经验476枚
  • 威望3点
  • 贡献值414点
  • 好评度89点
  • 社区居民
  • 忠实会员
2楼#
发布于:2009-11-22 17:41
如果仅仅要让 Firefox 能显示的话,把代码里面的
style="display:none;"

都删除就可以了。
这代码是页面中的脚本命令来禁用的,Firefox 因找不到该脚本或该脚本不兼容而不能禁用。

但重点在于这几行:
<base href="file://D:/Work/MirandaQQ/Plugins/ieview/satin/">
<link rel="stylesheet" type="text/css" href="main.css" />
<link rel="stylesheet" type="text/css" href="greenblueorange.css" />
<script language="Javascript" src="scripts.js"></script>

第一行把页面所有文件引用指向其后面的路径,于是后面三行的文件引用都转到该路径下,例如第二行的样式表实际在
file://D:/Work/MirandaQQ/Plugins/ieview/satin/main.css

里。由于这是绝对路径引用,当路径不存在的时候就都失效。
即使路径存在,里面的脚本也可能调用了 IE only 代码而在 Firefox 中失效;但改脚本代码可能又会导致 IEview 出错,除非你把所有文件复制出来再更改。
pppguest3962
狐狸大王
狐狸大王
  • UID26872
  • 注册日期2008-11-01
  • 最后登录2023-08-16
  • 发帖数343
  • 经验158枚
  • 威望0点
  • 贡献值236点
  • 好评度5点
3楼#
发布于:2009-11-22 17:41
hzhbest:如果仅仅要让 Firefox 能显示的话,把代码里面的
style="display:none;"

都删除就可以了。
回到原帖


谢谢!!!


里。由于这是绝对路径引用,当路径不存在的时候就都失效。
即使路径存在,里面的脚本也可能调用了 IE only 代码而在 Firefox 中失效;但改脚本代码可能又会导致 IEview 出错,除非你把所有文件复制出来再更改。[/quote]

您的意思是.css恐怕有未知的IE only代码?
的确如此,全删除了上面那一句后,FF看到的页面是破碎不完整的,应该是哪几个.css & scripts.js要修改了,呵呵,帖出代码,忘求各位高手出手! 感激不尽!!


main.css

body 		{ margin: 10px 15px 10px 15px; background-color:#F5F5F5;}
.nameheader	{ font-family:Tahoma;font-weight:bold;font-size:11px;background:url(images/sender/sender_fill.png) repeat-x; }
.msgheader	{ font-family:Arial;font-weight:bold;font-size:11px; }
.bicon		{ padding-top:3px;vertical-align:top;text-align:center;background:url(images/buddy_background.png) top left no-repeat; width:40px;}
.biconbig	{ padding-bottom:5px;padding-top:3px;vertical-align:top;text-align:center;background:url(images/buddy_background_big.png) top left no-repeat; width:58px;}
.message	{ vertical-align:top; }
.msgtable	{ vertical-align:top;background:url(images/message/message_bot_right2.png) bottom right #fff repeat-x; }
.leftbg		{ vertical-align:top;background:url(images/message/message_bot_left.png) bottom left no-repeat; width:12px;font-size:1px; }
.rightbg	{ vertical-align:top;background:url(images/message/message_bot_right.png) bottom right no-repeat; width:12px;font-size:1px; }
.topbg		{ vertical-align:top;background:url(images/message/message_top_fill.png) top left repeat-x; width:12px;font-size:7px; }

a:link,a:visited,a:active	{ color:#333;text-decoration:underline; }
a:hover				{ color:#333; }
img.img				{ vertical-align:middle;margin-top:2px;margin-bottom:2px; }

.hnameheader	{ font-family:Tahoma;font-weight:bold;font-size:11px;background:url(images/sender/sender_context_fill.png) repeat-x; }
.hmsgtable	{ vertical-align:top;background:url(images/message/message_context_bot_right2.png) bottom right #F2F2F2 repeat-x; }
.hleftbg	{ vertical-align:top;background:url(images/message/message_context_bot_left.png) bottom left no-repeat; width:12px;font-size:1px; }
.hrightbg	{ vertical-align:top;background:url(images/message/message_context_bot_right.png) bottom right no-repeat; width:12px;font-size:1px; }
.htopbg		{ vertical-align:top;background:url(images/message/message_context_top_fill.png) top left repeat-x; width:12px;font-size:7px; }

.innermsg	{ color:#585858;padding-bottom:2px;vertical-align:top; font-size:11px; }
.hinnermsg	{ color:#585858;padding-bottom:2px;vertical-align:top; font-size:11px; }
.nextmsg	{ word-wrap:break-words;padding-bottom:3px;color:#585858;padding-top:1px;top:5px;border-top:1px solid #ddd;vertical-align:top; font-size:11px;}
.time		{ width:50px;font-size:9px;color:#999;text-align:right;vertical-align:top; }
.htime		{ width:50px;font-size:9px;color:#999;text-align:right;vertical-align:top; }
.nextmsgtime	{ padding-top:1px;border-top:1px solid #ddd; font-size:9px;color:#999;text-align:right;vertical-align:top; }

.protocollong,.protocolinlong,.hprotocollong,.hprotocolinlong	{ width:170px; }



greenblueorange.css


.name		{ color:#75AE4F;padding-left:13px;padding-bottom:3px;text-align:left;height:25px; background:url(images/sender/standard/sender_left.png) no-repeat; }
.protocol	{ width:78px;color:#9CC684;padding-right:13px;padding-bottom:3px;text-align:right;height:25px; background:url(images/sender/standard/green/sender_right.png) top right no-repeat; }
.protocollong	{ color:#9CC684;padding-right:13px;padding-bottom:3px;text-align:right;height:25px; background:url(images/sender/standard/green/sender_right.png) top right no-repeat; }
.namein		{ color:#525FAD;padding-left:13px;padding-bottom:3px;text-align:left;height:25px; background:url(images/sender/standard/sender_left.png) no-repeat; }
.protocolin	{ width:78px;color:#848FC7;padding-right:13px;padding-bottom:3px;text-align:right;height:25px; background:url(images/sender/standard/blue/sender_right.png) top right no-repeat; }
.protocolinlong	{ color:#848FC7;padding-right:13px;padding-bottom:3px;text-align:right;height:25px; background:url(images/sender/standard/blue/sender_right.png) top right no-repeat; }
.status		{ margin-bottom:10px;color:#fff;height:23px;font-family:"Helvetica";font-size: 9px;font-weight: bold; background: url("images/status/orange/status_fill.png") top repeat-x; }
.statusMessage	{ padding-left:13px;padding-bottom:4px;text-align:left; background: url("images/status/orange/status_left.png") left top no-repeat; }
.statusTime 	{ padding-right:13px;padding-bottom:4px;text-align: right; background: url("images/status/orange/status_right.png") right top no-repeat; }

.hname		{ color:#75AE4F;padding-left:13px;padding-bottom:3px;text-align:left;height:25px; background:url(images/sender/standard/sender_context_left.png) no-repeat; }
.hprotocol	{ width:78px;color:#9CC684;padding-right:13px;padding-bottom:3px;text-align:right;height:25px; background:url(images/sender/standard/green/sender_context_right.png) top right no-repeat; }
.hprotocollong	{ color:#9CC684;padding-right:13px;padding-bottom:3px;text-align:right;height:25px; background:url(images/sender/standard/green/sender_context_right.png) top right no-repeat; }
.hnamein	{ color:#525FAD;padding-left:13px;padding-bottom:3px;text-align:left;height:25px; background:url(images/sender/standard/sender_context_left.png) no-repeat; }
.hprotocolin	{ width:78px;color:#848FC7;padding-right:13px;padding-bottom:3px;text-align:right;height:25px; background:url(images/sender/standard/blue/sender_context_right.png) top right no-repeat; }
.hprotocolinlong{ color:#848FC7;padding-right:13px;padding-bottom:3px;text-align:right;height:25px; background:url(images/sender/standard/blue/sender_context_right.png) top right no-repeat; }



scripts.js

// ------
// Message Grouping Script
// Thanks to cpm for this Javascript!
// ------

// Appends text via a hidden <div></div>
function appendGroupMsg() {
   theMsg=document.getElementById("message_current");
   newMsg=document.getElementById("msg_new_grouped");

   if (theMsg && newMsg) {
      theMsg.innerHTML+=newMsg.innerHTML;
      // no need to have the info in the log twice (it`s hell on copy and paste)
      newMsg.innerHTML="";
      // we don't want to confuse this w/ the next message.
      newMsg.id="";
   }
}
// this groupped message is done, we don't want to confuse it w/ the next group
function endGroupMsg() {
   theMsg=document.getElementById("message_current");

   if (theMsg) {
      theMsg.id="message_history";
   }
}
游客

返回顶部