简体   繁体   English

jQuery无法与Internet Explorer正常工作

[英]Jquery not working properly with internet explorer

I have developed my page using struts2-jquery tabpannel. 我已经使用struts2-jquery tabpannel开发了页面。 Everything is working well. 一切都很好。

Functionality : I have data table on each tab, which submits data to action class and loads new data in ths same selected tab without refreshing the whole page. 功能:每个选项卡上都有一个数据表,该表将数据提交给动作类,并在相同的所选选项卡中加载新数据,而无需刷新整个页面。

Requirement : Whole page should not get reloaded. 要求:整个页面不应重新加载。 Just tabs should be refreshed/reload with new data 只是标签应该刷新/重新加载新数据

Problem : Working perfect with chrome browser, but not working properly in IE. 问题:可以与chrome浏览器完美配合,但在IE中无法正常工作。 In case of IE, on submiting my data in tabs, new data is successfully loaded in tab without refreshing the whole page. 如果使用IE,则在选项卡中提交我的数据时,新数据将成功加载到选项卡中,而无需刷新整个页面。 But soon after new data loaded, IE refresh the whole window. 但是在加载新数据后不久,IE将刷新整个窗口。

structure looks like : http://jsfiddle.net/rohanparekh/ZvtRM/7/ 结构如下: http : //jsfiddle.net/rohanparekh/ZvtRM/7/

I have tried both below methods to but no luck. 我已经尝试了以下两种方法,但是没有运气。 Any idea ? 任何想法 ?

var e= document.getElementById("myForm");
        e.submit(); 
        $("#dashboardForm").submit(); 

Help appreciated. 帮助表示赞赏。 Thanks 谢谢

Add type="button" on html tag.. It will work if you choose IE7 from IE developer tools. 在html标记上添加type="button" 。如果您从IE开发人员工具中选择IE7,它将起作用。

A Submit button has the same default behavior as a button created by using the submit type with the input object. “提交”按钮的默认行为与通过将提交类型与输入对象一起使用创建的按钮相同。 If the ENTER key is pressed while a user is viewing a form that contains a Submit button, the form is submitted. 如果用户在查看包含“提交”按钮的表单时按下ENTER键,则将提交表单。 This default behavior of a Submit button is indicated by a border surrounding the button. 提交按钮的默认行为由按钮周围的边框指示。 The border appears when any control in the form receives the focus, other than another button. 当窗体中的任何控件获得焦点(另一个按钮除外)时,将显示边框。 If the Submit button has a name property, the button contributes a name/value pair to the submitted data. 如果“提交”按钮具有名称属性,则该按钮将名称/值对贡献给提交的数据。

Windows Internet Explorer 8 and later. Windows Internet Explorer 8及更高版本。 The default value of this attribute depends on the current document compatibility mode. 此属性的默认值取决于当前文档兼容模式。 In IE8 Standards mode, the default value is submit. 在IE8标准模式下,默认值为Submit。 In other compatibility modes and earlier versions of Windows Internet Explorer, the default value is button. 在其他兼容模式和Windows Internet Explorer的早期版本中,默认值为button。

http://msdn.microsoft.com/en-us/library/ie/ms534696(v=vs.85).aspx http://msdn.microsoft.com/en-us/library/ie/ms534696(v=vs.85).aspx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM