Jquery中的get和post方法传值需要注意的

        Jquery的get和post方法都有三个参数: url, params, callback.即地址,数据和回调函数,后面两个为可选参数.实际上地址上也是可以带上数据的,例如jquery.php?a=1&b=2.

       必须记住:地址后面的数据永远是以get方式传递的.无论是get方法还是post方法;而data参数中的数据时根据方法传递方式的。最好把数据统一放在params参数中。

Leave a comment

Your comment

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word