即8个兼容性问题
我在使用 ie 8 兼容模式时遇到问题。我有一些带有图像的按钮。我的页面上还有一些 jquery 验证。当我使用无法通过验证器的输入测试 jquery 验证时,按钮上的图像消失,按钮延伸到它所在的表行的末尾,并且文本出现在其顶部。当我提交页面(无论是否处于兼容模式)时也会发生这种情况...
另外,不是这样刷新按钮上方有一条消息。该消息仅应在超时 javascript 函数运行完毕后出现。当兼容模式未打开时,它会执行此操作。发生了什么事,我该如何改变。请注意,这是一个 ASP.net MVC2 站点。我知道这一切都只是编写 HTML,但我认为这是一件值得思考的好事情。
更新代码。
$(".datepicker1").datepicker({
showOn: 'both',
buttonImage: '<%=Url.Content("~/images/calendar.gif")%>',
dateFormat: 'mm/dd/yy',
changeMonth: true,
changeYear: true
});
上面是具有按钮图像代码的 jquery 代码
<div id="countdownDiv" style="display:none">
<p><font color="#990000"><b>Sorry, This Data has expired. Please Refresh The page.</b></font></p>
<%
Html.BeginForm("EditTemplate", "PatientACO", new { Template = PatID, popID = population, PopulationPatID = PopPatId, Enc = encounter });
%><input type="submit" value="Refresh" id="test" /><%
Html.EndForm();%>
</div>
。上面是始终显示的代码段。
I am having issues with ie 8 compatibility mode. I have some buttons that have images on them. I also have some jquery validation on my page. When I test the jquery validation with input that won't pass the validator, The image on the button disapears, the button extends to the end of the table row that it is held in, and text appears over the top of it. This also occurs when I submit the page (in compatibility mode or not)...
Also, not that there is a message above the Refresh button. That message should only appear after a timeout javascript function has run its course. And it does that when compatability mode is not on. What is going on, and how can I change that. Note, this is an ASP.net MVC2 site. I know it all just writes HTML, but I thought that would be something nice to think about.
UPDATE WITH code.
$(".datepicker1").datepicker({
showOn: 'both',
buttonImage: '<%=Url.Content("~/images/calendar.gif")%>',
dateFormat: 'mm/dd/yy',
changeMonth: true,
changeYear: true
});
The above would be the jquery code that has the button image code
<div id="countdownDiv" style="display:none">
<p><font color="#990000"><b>Sorry, This Data has expired. Please Refresh The page.</b></font></p>
<%
Html.BeginForm("EditTemplate", "PatientACO", new { Template = PatID, popID = population, PopulationPatID = PopPatId, Enc = encounter });
%><input type="submit" value="Refresh" id="test" /><%
Html.EndForm();%>
</div>
The above would be the code segment that is always showing up.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
试试这个:
取自: http://www.codingforums.com/archive /index.php/t-79035.html
Try this:
Taken from : http://www.codingforums.com/archive/index.php/t-79035.html