20
| contentType is the type of data you're sending, so application/json; charset=utf-8 is a common one, as is application/x-www-form-urlencoded; charset=UTF-8 , which is the default.dataType is what you're expecting back from the server: json , html , text , etc. jQuery will use this to figure out how to populate the success function's parameter.
If you're posting something like:
and expecting back:
Then you should have:
If you're expecting the following:
Then you should do:
One more - if you want to post:
Then don't
stringify the data, and do:
|
domingo, 7 de septiembre de 2014
A1 parametros AJAX contentType dataType, stringify
Suscribirse a:
Enviar comentarios (Atom)
No hay comentarios:
Publicar un comentario