Then the problem arises. The jQuery code to jump to becomes invalid. even if the alert tag appears, after clicking confirm, it will jump directly to action & quot; to get data, php & quot ;, therefore, I would like to ask if there is any way to transmit data to php and ** determine ** in advance (the content determined by jQuery meets the requirements) to jump to the specified list. phpjQuery code: * functionsublime () {* if ($ (& #39; # name, # message & #39 ;). val (). length; *} jump to the jquery backend development of the PHP database
Then the problem arises. the redirected jQuery code becomes invalid. even if the alert tag appears, after clicking confirm, the code will jump directly to action = "get data, php ", therefore, I would like to ask if there is any way to transmit data to php and ** determine ** in advance (the content determined by jQuery meets the requirements) to jump to the specified list. php
JQuery code:
- Function sublime (){
- If ($ ('# name, # message'). val (). length <1 ){
- Alert ("Enter required items ");
- } Else if ($ ('# QQ'). val (). length <1 | $ (' # telphone '). val (). length <1 ){
- Alert ("enter an optional item ");
- } Else if ($ ('# telphone'). val (). length <10 ){
- Alert ("Enter the correct mobile phone number ");
- } Else {
- Window. location. href = "list. php ";
- }
- }