Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/76.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript IE表单属性_Javascript_Jquery_Html_Internet Explorer - Fatal编程技术网

Javascript IE表单属性

Javascript IE表单属性,javascript,jquery,html,internet-explorer,Javascript,Jquery,Html,Internet Explorer,我对Internet Explorer有问题。我必须使用属性表单,问题是它在Internet Explorer上不起作用(兼容性问题)。我如何在jQuery上做到这一点 <button type="submit" id="cancelForm" name="cancel" onclick="bCancel=true" form="myForm"/> 我正在尝试模拟表单属性和bCancel功能。当我按下“取消”按钮时,它会提交表单,但当它检查bCancel变量时,它会返回其他值。您想

我对Internet Explorer有问题。我必须使用属性表单,问题是它在Internet Explorer上不起作用(兼容性问题)。我如何在jQuery上做到这一点

<button type="submit" id="cancelForm" name="cancel" onclick="bCancel=true" form="myForm"/>

我正在尝试模拟表单属性和bCancel功能。当我按下“取消”按钮时,它会提交表单,但当它检查bCancel变量时,它会返回其他值。

您想实现什么?到底是什么不起作用?请更新您的问题,并尝试更清楚地了解您面临的问题。ThanksI更新了答案,我不知道我还能说什么…@RodrigoJuarez它返回了什么值?一点OT,什么是
bCancel=true
do?将变量bCancel设置为true,这样Struts验证器将把控制权传递给操作。您试图实现什么?到底是什么不起作用?请更新您的问题,并尝试更清楚地了解您面临的问题。ThanksI更新了答案,我不知道我还能说什么…@RodrigoJuarez它返回了什么值?一点OT,什么是
bCancel=true
do?将变量bCancel设置为true,这样Struts验证器将把控制权传递给操作。您试图实现什么?到底是什么不起作用?请更新您的问题,并尝试更清楚地了解您面临的问题。ThanksI更新了答案,我不知道我还能说什么…@RodrigoJuarez它返回了什么值?一点OT,什么是
bCancel=true
do?将变量bCancel设置为true,因此Struts验证器将控制权传递给操作。
$("#cancelForm").click(function() {
    bCancel = true;
    $("#myForm").submit();
});