OnChange没有在IE8上工作 [英] OnChange not working on IE8

查看:86
本文介绍了OnChange没有在IE8上工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好。我正在用ASP开发一个应用程序。我有一个这样的代码:

Hi. I'm developing an application with ASP. I have a code such this:

...
<body">

    <form id="form1" runat="server" onchange="change()">
    
                //dinamic page with textbox, checkbox, ...

    </form>
  
</body>
...

<script type="text/javascript" >
    ...
     
     function change() {
        changevar=1;
     }

     ...
</script>

当我修改文本框中的某些文字时,或者我检查或者取消选中页面中的复选框ecc,必须更改var'changevar'以操作我已经检查过的其他控件。

When i modify some text on textbox, or I check or uncheck checkbox ecc in the page, the var 'changevar' must be change to operate other controls that i already check that works.

它在Firefox和IE9中工作正常,但在IE8似乎忽略了OnChange。这个应用程序也将用于带有XP的PC,因此我需要与IE8兼容。

It works fine in Firefox and also in IE9, but in IE8 it seems that the OnChange is ignored. This application it will be used also in PCs with XP, and so i need the compatibility ith IE8.

有人可以帮助我吗?任何技巧和修复解决方案?

Someone can help me? Any trick and fix solution?

谢谢!

推荐答案

参见 http://www.4guysfromrolla.com/webtech/090200-1.shtml  以获取使用asp.net进行表单验证的示例

See http://www.4guysfromrolla.com/webtech/090200-1.shtml for examples of form validation using asp.net

请参阅 http://www.eborcom.com/webmaker/教程/ rhoque / event2.html  以获取vanilla html表单验证的示例....

see http://www.eborcom.com/webmaker/tutorials/rhoque/event2.html for an example of vanilla html form validation....

既不使用带有onchange事件处理程序的表单元素...

neither uses a form element with an onchange event handler...

这是我的一个asp.net母版页的开始表格标签....

here is the opening form tag from one of my asp.net master pages....

<form id="form1" enctype="multipart/form-data" method="post" runat="server">


看起来不像你的......似乎你还没有掌握asp.net回发的概念?

looks nothing like yours.... seems you haven't grasped the concepts of asp.net postbacks?

问候。


这篇关于OnChange没有在IE8上工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆