使用 jQuery 将 PNG 修复注入文档头时,IE6 报告无效参数
我在 IE6 中遇到以下代码报告“无效参数”的问题。
function LoadScriptsAndExecute(url) {
this.url = url;
this.loadScript = function() {
$.ajax({
url: this.url,
cache: true,
dataType: 'script',
success: function(){
//alert(this.url);
},
error: function(){
//alert('error');
}
});
return true;
}
}
// IE6 fixes | Semi-transparent PNG
if (icisSite.isIE(6, 'lte') == true) {
var pngFix = new LoadScriptsAndExecute("/Global/ICIS/Scripts/DD_belatedPNG_0.0.8a-min.js");
var pngList = new LoadScriptsAndExecute("/Global/ICIS/Scripts/DD_PNG_listing.js");
pngFix.loadScript();
pngList.loadScript();
}
我非常确定我无法弄清楚这一点,因为它在不存在的行上报告了无效参数。一切都非常令人沮丧。
Am having problems with the following code reporting an 'invalid argument' in IE6.
function LoadScriptsAndExecute(url) {
this.url = url;
this.loadScript = function() {
$.ajax({
url: this.url,
cache: true,
dataType: 'script',
success: function(){
//alert(this.url);
},
error: function(){
//alert('error');
}
});
return true;
}
}
// IE6 fixes | Semi-transparent PNG
if (icisSite.isIE(6, 'lte') == true) {
var pngFix = new LoadScriptsAndExecute("/Global/ICIS/Scripts/DD_belatedPNG_0.0.8a-min.js");
var pngList = new LoadScriptsAndExecute("/Global/ICIS/Scripts/DD_PNG_listing.js");
pngFix.loadScript();
pngList.loadScript();
}
Am pretty sure that i won't be able to get to the bottom of this as it is reporting an invalid argument on a line that does not exist. All quite frustrating.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于框架的限制,我决定不去理会这个实现,让 IE6 按原样显示半透明 PNG。
I have decided that due to the constraints of the framework not to bother with this implementation and let IE6 displays semi-transparent PNG as they are.