如果未定义则为0否则为自定义数据(前台)

前端之家收集整理的这篇文章主要介绍了如果未定义则为0否则为自定义数据(前台)前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

一句代码分享给你们,自己感悟去吧,不懂的,留言评论

[java] view plain @L_404_1@
  1. run : function(){
  2. $.ajax({
  3. url:url,
  4. data:{id:id,name:("undefined" == typeof zhang || zhang == null)?0 :zhang},
  5. type:'post',108); list-style:decimal-leading-zero outside; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important"> dataType:'json',108); list-style:decimal-leading-zero outside; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important">
  6. beforeSend:function(){},108); list-style:decimal-leading-zero outside; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important"> success:function(){},108); list-style:decimal-leading-zero outside; line-height:18px; margin:0px!important; padding:0px 3px 0px 10px!important"> error:function(){}
  7. })
  8. }

猜你在找的Ajax相关文章