special characters jquery load
How would you submit special characters though jquery load function and recieve them on the php si开发者_开发百科de?
$('#DIV').load('page.php?type=' + type)
And
On page.php $type = $_GET['type']
Where 'type' is a word with values such as 'é'.
Cheers.
Take a look at get method. Use either .get or .ajax methods. Like so:
var data = {
type: 'anything really'
};
$.get(url, data, callback);
You can also use $.ajax. It has a similar syntax but provides more options. These methods automatically escape your data so you don't really have to worry about that.
精彩评论