ajax的添加方法,jQuery
我有这段代码。我需要添加一个sub_season var。如何添加更多的var?我在谷歌托盘看,但没有结果。 谢谢你,如果你帮我!jQuery - AJAX load()方法如何添加2多变量
echo"
$(document).ready(function() {
// when the user submit a form
$('form').submit(function() {
var url = $(this).attr('action'); // gets the url from 'action' attribute of the current form
// define data to be send to PHP
// with the key 'pag' and the value selected in the select list (with id='pag')
var data = 'season='+ $('#season').val();
// adds a 'loading...' notification, load the content from url (passing the data)
// and place it into the tag with id='content'
$('#content').html('
Loading...
').load(url, data);return false;
});
});
-->";
echo"
DefaultSelect course:
season
PHP
Ajax
sub_season
PHP
Ajax
";?>
2014-02-13
cropp
+3
为什么要像这样呈现静态HTML? –
ajax的添加方法,jQuery
我有这段代码。我需要添加一个sub_season var。如何添加更多的var?我在谷歌托盘看,但没有结果。 谢谢你,如果你帮我!jQuery - AJAX load()方法如何添加2多变量
echo"
$(document).ready(function() {
// when the user submit a form
$('form').submit(function() {
var url = $(this).attr('action'); // gets the url from 'action' attribute of the current form
// define data to be send to PHP
// with the key 'pag' and the value selected in the select list (with id='pag')
var data = 'season='+ $('#season').val();
// adds a 'loading...' notification, load the content from url (passing the data)
// and place it into the tag with id='content'
$('#content').html('
Loading...
').load(url, data);return false;
});
});
-->";
echo"
DefaultSelect course:
season
PHP
Ajax
sub_season
PHP
Ajax
";?>
2014-02-13
cropp
+3
为什么要像这样呈现静态HTML? –