国产亚洲精品福利在线无卡一,国产精久久一区二区三区,亚洲精品无码国模,精品久久久久久无码专区不卡

當前位置: 首頁 > news >正文

衡陽有線寬帶網(wǎng)站怎么做app推廣

衡陽有線寬帶網(wǎng)站,怎么做app推廣,蚌埠網(wǎng)站建設蚌埠,企業(yè)網(wǎng)站快速優(yōu)化排名1.通過<form action"url"><input type"submit"></form>按鈕方式提交 這種方式是最傳統(tǒng)的提交表單的方式&#xff0c;就是把所有的表單的值傳到url界面。用于本頁面?zhèn)鞅卷撁姹容^多。 2.通過<input type"button" method"…

1.通過<form action="url"><input type="submit"></form>按鈕方式提交

? 這種方式是最傳統(tǒng)的提交表單的方式,就是把所有的表單的值傳到url界面。用于本頁面?zhèn)鞅卷撁姹容^多。

2.通過<input type="button" method="post/get" οnclick="onSubmit()">

 這里是通過onclick觸發(fā)js事件,然后我們可以在function onSubmit(){}寫一些傳輸方式,比較典型的就是ajax傳輸:

 1 var j$ = jQuery.noConflict();//注冊jQuery
 2 function onSubmit(){
 3     j$.ajax({
 4         type:"get",
 5         url:"fix_project_contrast_do.jsp",
 6         data:{
 7             fixitem_id : j$("#fixitem_id").val(),
 8             check_man : j$("#check_man").val()
 9         },
10         success:function(ret){
11             if(ret == 1) {
12                 alert("提交審核成功!");
13             }else{
14                 alert(ret);
15                 
16             }
17             window.returnValue=true;
$.ajax({cache: true,type: "POST",url:ajaxCallUrl,data:$('#yourformid').serialize(),// 你的formidasync: false,error: function(request) {alert("Connection error");},success: function(data) {$("#commonLayout_appcreshi").parent().html(data);}});

18 window.close();19 }20 });21 }
然后我們可以在fix_project_contrast_do.jsp處理

1 <%@ page contentType="text/html; charset=GBK"  import="相應的類路徑" %>
 2 
 3 <%
 4 try{
 5     
 6     Integer fixitem_id = Utility.trimNull(request.getParameter("fixitem_id")), new Integer(0));
 7     Integer check_man = Utility.parseInt(Utility.trimNull(request.getParameter("check_man")), new Integer(0));
 8     //處理邏輯省略
 9     out.clear();
10     response.getWriter().write("1");//response相應值
11 }catch(Exception e){
12     out.clear();
13     response.getWriter().write(e.getMessage());
14 }
15 
16 %>
$.ajax({cache: true,type: "POST",url:ajaxCallUrl,data:$('#yourformid').serialize(),// 你的formidasync: false,error: function(request) {alert("Connection error");},success: function(data) {$("#commonLayout_appcreshi").parent().html(data);}});
這種ajax異步傳輸用于修改后保存然后刷新頁面比較多。

擴展:

如果我上傳的頁面包含<input type="file">的時候,需要修改在我們form標簽

<form name="form_name" name="form_loan_update" enctype="multipart/form-data" method="post">?我們就要通過下面代碼提交表單了,fileElementId:'form_name'是提交form_name整個表單

復制代碼
        jQuery.ajaxFileUpload({async:false,url:'fix_project_contrast_do.jsp',secureuri:false,fileElementId:'form_name',dataType: 'json',beforeSend:function(){},complete:function(){},                success: function (data, status){//表單參數(shù)//次順序   alert("保存成功");    window.location.reload();//刷新                            
            },error: function (data, status, e){var result = Ext.MessageBox.show({title: '事務表單異常',msg: data.responseText,width:520,closable:false});}});}
復制代碼

然后在fix_project_contrast_do.jsp接收數(shù)據(jù)的數(shù)據(jù)需要

  Integer fixitem_id = Utility.trimNull(file.getParameter("fixitem_id")), new Integer(0));

3.通過<form name="test" method="post" action="#"><input type="button" οnclick="document.test.submit()"></form>

使用java代碼實現(xiàn)相應的業(yè)務代碼

復制代碼
 1 <%
 2 if (request.getMethod().equals("POST")) {
 3     /**邏輯代碼
 4       *1.獲取參數(shù)
 5       *2.處理參數(shù),實現(xiàn)業(yè)務邏輯
 6       *3.設置標識,用于通過js跳轉(zhuǎn)頁面或刷新頁面
 7       */
 8       bSuccess = true;
 9 }
10 %>
11 <%if (bSuccess) {%>
12     alert("保存成功!");
13     var url = "對應的url參數(shù)";
14     location = url;
15 <%}%>
復制代碼

4.異步傳輸,實時監(jiān)控表單數(shù)據(jù)

復制代碼
 1 <script type="text/javascript">
 2     var req=false;//異步請求提交對象
 3     //1、初始化異步請求提交對象
 4     function init(){
 5         if(window.ActiveXObject){//IE
 6         req=new ActiveXObject("Microsoft.XMLHTTP");
 7         }else{//firefox
 8             req=new XMLHttpRequest();
 9         }
10     }
11     //發(fā)送請求
12     function sendReq(){
13         init();
14         var sd=document.getElementById("stid").value;
15         //2、指定處理返回值的函數(shù)
16         req.onreadystatechange=process;
17         //3、打開到資源的連接
18         req.open("get","url",true);
19         //4、發(fā)送請求
20         req.send(null);
21     }
22     //5、處理返回值
23     function process(){
24         if(req.readyState==4){
25             if(req.status==200){
26             //獲取返回值
27             var v=req.responseText;
28              var d=document.getElementById("divsid");
29             d.innerHTML=v;
30         }
31     }
32 }         
33 </script>
復制代碼

?5.$.post()提交表單,$.ajax的封裝,原理和$.ajax一樣。需要導入.jquery.js包

復制代碼
 1     js$.post("problem_invest_use_money_getCustInfo.jsp", {"fixitem_id" : fixitem_id}, function(data){
 2         if(data != 0){
 3             var params = data.split("$");
 4             if(params[0] == 1){
 5                 document.getElementById("jkr_cust_id").value = params[1];
 6                 document.getElementById("jkr_cust_name").value = params[2];
 7             }else{
 8                 alert(data)
 9             }
10         }
11     });
復制代碼

其中回調(diào)函數(shù)data就是通過java代碼:response.getWriter().write(returnString);返回

6.showModalDialog返回獲取放回字符串

復制代碼
 1 function btnChoose(){
 2     if(!sl_checkChoice(document.theform.fixitem_id, "項目ID"))        return false;
 3     if(!sl_checkChoice(document.theform.jj_contract_sub_bh, "合同編號"))        return false;
 4     var fixitem_id = document.getElementById("fixitem_id").value;
 5     var jj_contract_bh = document.getElementById("jj_contract_sub_bh").value;
 6     var v = showModalDialog('/efifs/zhongjiantou/repayment_principal_plan_choose.jsp?fixitem_id='+fixitem_id+'&jj_contract_bh='+jj_contract_bh,'','dialogWidth=1000px;dialogHeight=800px;status=no;help=0');
 7     var params = v.split("$");
 8     document.getElementById("money").value = params[0];
 9     document.getElementById("lx_money").value = params[1];
10     document.getElementById("plan_id_list").value = params[2];
11 }
復制代碼

其中 v = window.returnValue = returnString;?




http://m.aloenet.com.cn/news/38068.html

相關文章:

  • 南京網(wǎng)站制作設計公司尋找客戶的12種方法
  • 企業(yè)寬帶可以做網(wǎng)站嗎安卓優(yōu)化大師手機版下載
  • 免費直播網(wǎng)站開發(fā)seo關鍵詞優(yōu)化排名
  • 站長工具亞洲中文精品軟文推廣一般發(fā)布在哪些平臺
  • 南京網(wǎng)站建設蘇icp備蘭州正規(guī)seo整站優(yōu)化
  • 上海市住房與城鄉(xiāng)建設管理委員會網(wǎng)站網(wǎng)絡營銷咨詢公司
  • 管理員怎么看網(wǎng)站在線留言越秀seo搜索引擎優(yōu)化
  • 金壇網(wǎng)站建設哪家好百度網(wǎng)絡營銷
  • wordpress菜單不現(xiàn)實seo百度快速排名
  • 手機網(wǎng)站怎么做微信登陸6sem技術培訓
  • 網(wǎng)站策劃書模板大全怎么做一個網(wǎng)站的步驟
  • 二級域名 電子商務網(wǎng)站推廣方案網(wǎng)絡營銷師培訓費用是多少
  • 天津自貿(mào)區(qū)建設局網(wǎng)站網(wǎng)絡營銷企業(yè)案例
  • 投票網(wǎng)站如何做優(yōu)化技術基礎
  • 網(wǎng)站地址做圖標百度搜索引擎地址
  • 大理 網(wǎng)站建設站長工具seo綜合查詢煙雨樓
  • 怎么做視頻解析的網(wǎng)站四川全網(wǎng)推網(wǎng)絡推廣
  • 小企業(yè)網(wǎng)站源碼營銷型網(wǎng)站制作公司
  • 男女情感類網(wǎng)站谷歌優(yōu)化技巧
  • 館陶網(wǎng)站建設電話友情鏈接交換
  • 網(wǎng)站開發(fā)技術的發(fā)展流程境外電商有哪些平臺
  • 公司做網(wǎng)站有問題怎么維權滄州百度推廣總代理
  • 在淘寶上做的網(wǎng)站要轉(zhuǎn)出seo研究
  • gwt 網(wǎng)站開發(fā)廈門人才網(wǎng)唯一官網(wǎng)
  • 常用于做網(wǎng)站的軟件磁力屋 最好用
  • 時尚工作室網(wǎng)站源碼網(wǎng)站推廣公司排行榜
  • 安全的定制型網(wǎng)站建設seo工程師是做什么的
  • 廣州網(wǎng)站維護制作2021年網(wǎng)絡十大關鍵詞
  • 南寧大型網(wǎng)站推廣公司seochinazcom
  • 網(wǎng)站開發(fā)環(huán)境寫什么廊坊百度提升優(yōu)化