即8个兼容性问题

发布于 2024-12-13 12:38:22 字数 1205 浏览 0 评论 0原文

我在使用 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)... enter image description here

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

海拔太高太耀眼 2024-12-20 12:38:22

试试这个:

<form method="post">
<input type="hidden" name="select" value="" />
<input type="image" name="submit" value="somePresident" src="president.gif" onclick="this.form.select.value = this.value" />
</form>

取自: http://www.codingforums.com/archive /index.php/t-79035.html

Try this:

<form method="post">
<input type="hidden" name="select" value="" />
<input type="image" name="submit" value="somePresident" src="president.gif" onclick="this.form.select.value = this.value" />
</form>

Taken from : http://www.codingforums.com/archive/index.php/t-79035.html

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文