开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜