Home > Backend Development > PHP Tutorial > php跳转-我用jQuery实现跳转到list.php页面,但是又想将这一页的数据通过php传给数据库

php跳转-我用jQuery实现跳转到list.php页面,但是又想将这一页的数据通过php传给数据库

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-02 11:27:32
Original
1218 people have browsed it

phpphp跳转数据库jquery后端开发

那么问题来了,跳转的jQuery代码失效了,即使出现alert标签,点确认后还是会直接跳转到action="获取数据的,php",所以想问有没有什么办法可以即传输数据给php,又事先**判断**(jQuery判断的内容满足要求),跳转到指定list.php

jQuery代码:

  • function sublime(){
  • if ($('#name,#message').val().length
  • alert("请输入必填项");
  • }else if($('#qq').val().length
  • alert("请输入选填项");
  • }else if($('#telphone').val().length
  • alert("请输入正确的手机号码");
  • }else{
  • window.location.href="list.php";
  • }
  • }
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