1

我们的网站有几个附属公司,它们使用 JavaScript 小部件来显示广告空间中可用的最新内容。这一切都是由 JavaScript 驱动的。在正确的位置插入脚本,我们的 rails 应用程序会生成一些 rhtml 来插入。周三,这突然停止在 IE 中工作。除 IE 外,其他所有浏览器都可以正常显示代码。有人可以指出如何解决这个问题的方向吗?

这是有问题的代码:

document.write('<div id="std-widget" style="width:300px;height:250px;text-align:center;border-style:none;">');
document.write('<a href="<%= @hrefPath %>" target="_blank">')
<% if @deal %>
  document.write('<img src="<%= @imagePath %>" style="border-style:none;" alt="Today\'s Deal in <%= @affiliate.market.name %> - <%= @deal.subject.gsub("'","\\\\'") %>" />');
<% else %>
  document.write('<img src="<%= @imagePath %>" style="border-style:none;" alt="Sign Up Today for Great Deals in <%= @affiliate.market.name %>" />');
<% end %>
document.write('</a>');
document.write('</div>');

那里有什么东西是 IE 突然不喜欢的吗?谢谢!

4

0 回答 0