js 修改form表單

function submitTo(type){
            var obj=document.getElementById("form");
            if(type==1){
                obj.action="exportBusiness";
                obj.enctype="application/x-www-form-urlencoded";
                obj.method="get";
            }
            else if(type==2){
                obj.action="importBusiness";
                obj.enctype="multipart/form-data";
                obj.method="post";
            }
            obj.submit();
  }
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章