例子:性别不为2的修改为2
- <button class="personalizebutton" onclick="STAFFSRC_OPTION.doAlter(<et:datacolumn field='ID' />)" >修改性别</button>
- STAFFSRC_OPTION.doAlter = function(id){
- if(!confirm('确定要修改性别吗?')){ return;}
- var url = 'file100.aspx?id=' + escape(id) + '&tmp=' + Math.random();
- $.get(url,function(){
- window.location.reload();
- });
- };
- //file100.aspx
- <et:dbdatasource id="gas" sourcename="GenderAlterSrc">
- <et:DbParameter name="id" source="page"> id </et:DbParameter>
- </et:dbdatasource>
- <et:dbsrcexecute datasource="gas" datasourcemethod="Execute"> </et:dbsrcexecute>
转载于:https://blog.51cto.com/doubleqian/467604