您的位置:首页 > Web前端 > JQuery

Submit a JQuery Mobile form via AJAX with PHP

2012-01-07 23:08 477 查看

Submit a JQuery Mobile form via AJAX with PHP

转载在:http://www.giantflyingsaucer.com/blog/?p=2574
Posted onApril 1, 2011byChad
Lung





I have a previous article on how to useJQuery Mobile (andPHP) to submit some data via AJAX. With a little modification you can
take that code and make it so you can submit an entire form. Today I’ll show you how to do that.

Note: I did this sample code on an
Ubuntu 10.10 Desktop system running nginx and PHP 5.3. I used JQuery Mobile alpha release 4. You can find out how to setup this particular instancehere.

The PHP page is very simple and will listen for two incoming fields.

File name: callajax.php

The HTML5 page takes two values (first name and last name) and uses
JQuery AJAX to send those serialized fields to the PHP page mentioned above. The results are then displayed.

File name: index.php





内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: