例子:性别不为2的修改为2

 

 

 
  
  1. <button class="personalizebutton" onclick="STAFFSRC_OPTION.doAlter(<et:datacolumn field='ID' />)" >修改性别</button> 

 

 
  
  1. STAFFSRC_OPTION.doAlter = function(id){  
  2.   if(!confirm('确定要修改性别吗?')){ return;}  
  3.   var url = 'file100.aspx?id=' + escape(id) + '&tmp=' + Math.random();  
  4.  $.get(url,function(){  
  5.      window.location.reload();  
  6.   });  
  7. };  

 

 
  
  1. //file100.aspx  
  2. <et:dbdatasource id="gas" sourcename="GenderAlterSrc"> 
  3.   <et:DbParameter name="id" source="page"> id </et:DbParameter> 
  4. </et:dbdatasource> 
  5. <et:dbsrcexecute datasource="gas" datasourcemethod="Execute"> </et:dbsrcexecute>