首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > JavaScript >

JQuery属性判断 + JSON 循环带参交付

2012-09-08 
JQuery属性判断 + JSON 循环带参提交//普通属性判断if($(#btn_customer).attr(title).replace(/(^\s*)

JQuery属性判断 + JSON 循环带参提交

//普通属性判断if($('#btn_customer').attr('title').replace(/(^\s*)|(\s*$)/g, "") == "2"){ //返回true}else{ //false}//checkbox  if($("#appo").is(":checked")){     //选中true   }esle{     //false   }//$.post提交var param = {};$('#currTable').find('input,select').each(function(){   param[this.name] = this.value;});param['ative'] = 'customer';$.post(url,param,function(data){if(data.result == 1){  alert('OK');}if(data == null){  alert('NO!');}},'json');

热点排行