Today due to the project requirements, need to js control form submitted, before submit for verification and processing of data. HTML code is as follows:

 


code is as follows:


<Div class="test - ft >" <H3 class="at terumo >" Mobile phone number XiongJi </h3 > <Form needcheck="1" method="post" target="_blank" action="http://www.go108.com.cn/go108_mobile_free_sz.php" > <P> ... </p> <The button class="BTN - act" > Measured immediately </button> </form> </div> Coding is completed, the browser compatibility tests is a problem: under ie6, ie7, click on the button did not reflect, jump is less than specified url, other browsers can jump. Always thought that is there is a problem in the js code control, so tracking debugging for a long time, never found the problem. Later, found no specified type for the submit button, so I wonder if this problem. After modify to add the type attribute of the button to submit, under ie6, ie7 function normal. Haven't noticed this problem in the past, on the hole, so the query to search data validation. W3shool has made a type attribute to the button on the detailed explanation: w3school/tags/att_button_type. HTM

 


code is as follows:


definition and usage type attribute specifies the type of button. Tip: please always be button type attribute. Internet Explorer is the default type "button", while the other browsers (including W3C specifications) of the default value is "submit". It can be seen that other browsers default button click to submit the form, and Internet explorer is the default click then don't submit the form, the type of the default value is also a browser compatibility problems, so under the mark.# 0 - #


This concludes the body part