我有这个问题,下面这个代码适用于除Firefox以外的所有浏览器,它在外部js文件和aspx文件中的链接
$(document).ready(function () {
var h = $(".img_cover").width() ;
if ($.browser.msie) {
$(".download_box").width(h + 1);
$(".download_pdf").width(h + 1);
$(".right_column").width(h);}
else{
$(".download_box").width(h - 22);
$(".download_pdf").width(h - 22);
}
});
Run Code Online (Sandbox Code Playgroud)
问题详情:
测试:
Local:适用于所有浏览器
Web服务器:(外部链接到ASPX主服务器)
Firefox:jquery代码未初始化
Explorer 6/7/8:工作正常
生成的aspx中的代码
<!DOCTYPE html PUBLIC "-//W3C//DTD MathML 2.0//EN" "http://www.w3.org/Math/DTD/mathml2/mathml2.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML">
<head id="ctl00_Header">
<title>Abstract and Applied Analysis — An Open Access Journal</title>
<link href="../../../styles/source_print.css" media="print" rel="stylesheet" type="text/css" />
<script src="http://beta.source/Scripts/lib/jquery.js" type="text/javascript"></script>
<script src="http://beta.source/Scripts/JQInt.js" type="text/javascript"></script>
<link href="http://beta.source/styles/source.css" rel="stylesheet" type="text/css" />
<link href="/styles/xml_display.css" rel="stylesheet" …Run Code Online (Sandbox Code Playgroud)