Home > Web Front-end > JS Tutorial > Analysis and solutions to the causes of jquery submit failure under ie6_jquery

Analysis and solutions to the causes of jquery submit failure under ie6_jquery

WBOY
Release: 2016-05-16 17:15:03
Original
1439 people have browsed it

ie6,

$('a.btn').click(function(){

form.submit();

})

Click fails;

Analysis:

Microsoft's lower version browser will first execute the link tag's own event, which is the href event, thus interrupting the form's submit event. "return false;" means interrupting the link tag's own event execution.

Solution: Change your thinking and use jquery to directly handle clicks on images, text, etc.

$('a.btn').click(function(){
$('form').get(0).submit();
return false;
});

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template