`
江雨行
  • 浏览: 24553 次
文章分类
社区版块
存档分类
最新评论

一个Form多个Action处理办法

 
阅读更多
< form name = "demo" method = "post" >
< input type = "button" value = "添加" onclick = "addAction()" >
< input type = "button" value = "删除" onclick = "deleteAction()" >
< input type = "button" value = "保存" onclick = "saveAction()" >
< input type = "button" value = "查询" onclick = "searchAction()" >
</ form >

<script type= "text/javascript" >
function addAction(){
     document.demo.action= "your add method url" ;
     document.demo.submit();
}
  
function deleteAction(){
     document.demo.action= "your delete method url" ;
     document.demo.submit();
}
  
function saveAction(){
     document.demo.action= "your add save url" ;
     document.demo.submit();
}
  
function searchAction(){
     document.demo.action= "your serach method url" ;
     document.demo.submit();
}
</script>

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics