使用JQuery的服务器端参数化方法调用

  • s1_549563
    了解作者
  • 31.4KB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-06-04 03:38
    上传日期
此演示演示了jquery如何调用服务器端参数化方法。
750487.zip
  • Server-Side-Parameterized-Method-Call-Using-JQuery.pdf
    37.2KB
内容介绍
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta charset="utf-8"><meta name="generator" content="pdf2htmlEX"><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><link rel="stylesheet" href="https://csdnimg.cn/release/download_crawler_static/css/base.min.css"><link rel="stylesheet" href="https://csdnimg.cn/release/download_crawler_static/css/fancy.min.css"><link rel="stylesheet" href="https://csdnimg.cn/release/download_crawler_static/16511628/raw.css"><script src="https://csdnimg.cn/release/download_crawler_static/js/compatibility.min.js"></script><script src="https://csdnimg.cn/release/download_crawler_static/js/pdf2htmlEX.min.js"></script><script>try{pdf2htmlEX.defaultViewer = new pdf2htmlEX.Viewer({});}catch(e){}</script><title></title></head><body><div id="sidebar" style="display: none"><div id="outline"></div></div><div id="pf1" class="pf w0 h0" data-page-no="1"><div class="pc pc1 w0 h0"><img class="bi x0 y0 w1 h1" alt="" src="https://csdnimg.cn/release/download_crawler_static/16511628/bg1.jpg"><div class="c x1 y1 w2 h2"><div class="t m0 x2 h3 y2 ff1 fs0 fc0 sc0 ls0 ws0">&#20351;&#29992;<span class="_ _0"></span>&#20351;&#29992;<span class="_ _1"></span><span class="ff2">JQu<span class="_ _2"></span>ery</span>&#30340;<span class="_ _2"></span>&#26381;&#21153;<span class="_ _2"></span>&#22120;<span class="_ _2"></span>&#31471;&#21442;<span class="_ _2"></span>&#25968;&#21270;<span class="_ _2"></span>&#26041;&#27861;<span class="_ _2"></span>&#35843;&#29992;<span class="_ _3"></span>&#30340;&#26381;<span class="_ _2"></span>&#21153;&#22120;<span class="_ _2"></span>&#31471;&#21442;<span class="_ _2"></span>&#25968;&#21270;<span class="_ _2"></span>&#26041;<span class="_ _2"></span>&#27861;&#35843;<span class="_ _2"></span>&#29992;</div><div class="t m0 x2 h4 y3 ff1 fs1 fc0 sc0 ls0 ws0">&#20171;&#32461;<span class="_ _4"></span>&#20171;&#32461;</div><div class="t m0 x2 h5 y4 ff1 fs2 fc0 sc0 ls0 ws0">&#36825;&#26159;&#19968;&#20010;<span class="_ _2"></span><span class="ff3">C</span>&#65283;&#39033;&#30446;<span class="_ _2"></span>&#65292;&#28436;&#31034;<span class="_ _2"></span>&#22914;&#20309;&#20351;&#29992;<span class="_ _2"></span>&#23458;&#25143;&#31471;<span class="_ _2"></span>&#33050;&#26412;&#35821;&#35328;<span class="_ _2"></span>&#65288;<span class="ff3">JQue<span class="_ _2"></span>ry</span>&#65289;&#35843;&#29992;<span class="_ _2"></span>&#20197;&#26381;&#21153;&#22120;<span class="_ _2"></span>&#31471;&#35821;&#35328;<span class="_ _2"></span>&#65288;<span class="ff3">C</span>&#65283;&#65292;<span class="_ _2"></span><span class="ff3">VB</span>&#65289;&#32534;&#20889;<span class="_ _2"></span>&#30340;&#26381;&#21153;<span class="_ _2"></span>&#22120;&#31471;&#21442;&#25968;<span class="_ _2"></span>&#21270;&#26041;</div><div class="t m0 x2 h5 y5 ff1 fs2 fc0 sc0 ls0 ws0">&#27861;&#12290;</div><div class="t m0 x2 h4 y6 ff1 fs1 fc0 sc0 ls0 ws0">&#20351;&#29992;&#20195;<span class="_ _2"></span>&#30721;<span class="_ _5"></span>&#20351;&#29992;&#20195;<span class="_ _2"></span>&#30721;</div><div class="t m0 x2 h6 y7 ff1 fs3 fc0 sc0 ls0 ws0">&#27493;&#39588;<span class="_ _6"></span>&#27493;&#39588;<span class="_ _2"></span><span class="ff2">1</span></div><div class="t m0 x2 h5 y8 ff4 fs2 fc0 sc0 ls0 ws0">WebForm<span class="_ _2"></span>1.aspx<span class="ff1">&#39029;&#38754;&#20855;<span class="_ _2"></span>&#26377;&#19968;&#20123;&#25511;<span class="_ _2"></span>&#20214;&#65292;&#22914;<span class="_ _2"></span>&#25353;&#38062;&#65292;&#25991;<span class="_ _2"></span>&#26412;&#26694;&#25511;<span class="_ _2"></span>&#20214;&#12290;<span class="ff3"> </span>&#25991;&#26412;&#26694;&#29992;&#20110;<span class="_ _2"></span>&#20174;&#23458;&#25143;&#31471;<span class="_ _2"></span>&#33719;&#21462;&#28040;<span class="_ _2"></span>&#24687;&#65292;&#24182;&#23558;<span class="_ _2"></span>&#20854;&#20256;&#36882;&#21040;<span class="_ _2"></span>&#26381;&#21153;&#22120;<span class="_ _2"></span>&#31471;&#26041;&#27861;&#12290;<span class="_ _2"></span><span class="ff3"> </span>&#21333;</span></div><div class="t m0 x2 h5 y9 ff1 fs2 fc0 sc0 ls0 ws0">&#20987;&#25353;&#38062;&#26102;<span class="_ _2"></span>&#65292;<span class="ff3"> <span class="fs4">div</span></span>&#20803;&#32032;<span class="_ _2"></span>&#26174;&#31034;&#20174;<span class="_ _2"></span>&#26381;&#21153;&#22120;&#25910;<span class="_ _2"></span>&#21040;&#30340;&#28040;<span class="_ _2"></span>&#24687;&#12290;</div><div class="t m0 x2 h7 ya ff3 fs2 fc0 sc0 ls0 ws0">C ++</div><div class="t m0 x2 h8 yb ff3 fs4 fc0 sc0 ls0 ws0">&lt;form id= " <span class="_ _2"></span>for<span class="_ _2"></span>m1" ru<span class="_ _2"></span>nat= " <span class="_ _2"></span>server"<span class="_ _2"></span> &gt;</div><div class="t m0 x2 h8 yc ff3 fs4 fc0 sc0 ls0 ws0"> &lt;div&gt;</div><div class="t m0 x2 h8 yd ff3 fs4 fc0 sc0 ls0 ws0"> &lt;asp<span class="_ _2"></span>:TextBox ID<span class="_ _2"></span>= "<span class="_ _2"></span> <span class="_ _2"></span>Text1" runa<span class="_ _2"></span>t= " <span class="_ _2"></span>server"<span class="_ _2"></span> /&gt;</div><div class="t m0 x2 h8 ye ff3 fs4 fc0 sc0 ls0 ws0"> &lt;asp<span class="_ _2"></span>:Button ID= <span class="_ _2"></span>"<span class="_ _2"></span> <span class="_ _2"></span>Button1" runat= " <span class="_ _2"></span>se<span class="_ _2"></span>rver"<span class="_ _2"></span> Text= "<span class="_ _2"></span> <span class="_ _2"></span>ClickM<span class="_ _2"></span>ENow" /&gt;</div><div class="t m0 x2 h8 yf ff3 fs4 fc0 sc0 ls0 ws0"> &lt;br /<span class="_ _2"></span>&gt;</div><div class="t m0 x2 h8 y10 ff3 fs4 fc0 sc0 ls0 ws0"> &lt;div<span class="_ _2"></span> id= " <span class="_ _2"></span>myDiv"<span class="_ _2"></span> &gt;&lt;/<span class="_ _2"></span>div&gt;</div><div class="t m0 x2 h8 y11 ff3 fs4 fc0 sc0 ls0 ws0"> &lt;/div&gt;</div><div class="t m0 x2 h8 y12 ff3 fs4 fc0 sc0 ls0 ws0"> &lt;/form&gt; </div><div class="t m0 x2 h6 y13 ff1 fs3 fc0 sc0 ls0 ws0">&#31532;<span class="_ _7"></span>&#31532;<span class="_ _2"></span><span class="ff2">2</span>&#27493;<span class="_ _7"></span>&#27493;</div><div class="t m0 x2 h5 y14 ff1 fs2 fc0 sc0 ls0 ws0">&#20351;&#29992;&#20197;&#19979;<span class="_ _2"></span><span class="ff3">JQuery</span>&#23545;<span class="_ _2"></span>&#26381;&#21153;&#22120;<span class="_ _2"></span>&#31471;&#26041;&#27861;&#36827;<span class="_ _2"></span>&#34892;<span class="_ _2"></span><span class="ff4">Ajax</span></div><div class="t m1 x3 h9 y14 ff1 fs5 fc0 sc0 ls0 ws0">&#35843;&#29992;</div><div class="t m0 x4 h5 y14 ff1 fs2 fc0 sc0 ls0 ws0">&#65306;</div><div class="t m0 x2 h7 y15 ff3 fs2 fc0 sc0 ls0 ws0">C ++</div><div class="t m0 x2 h8 y16 ff3 fs4 fc0 sc0 ls0 ws0">&lt;script src<span class="_ _2"></span>= "<span class="_ _2"></span> <span class="_ _2"></span>//code<span class="_ _2"></span>.jquery.com<span class="_ _2"></span>/jquery-1.9.<span class="_ _2"></span>1.js" &gt;&lt;/script&gt;</div><div class="t m0 x2 h8 y17 ff3 fs4 fc0 sc0 ls0 ws0">&lt;script src<span class="_ _2"></span>= "<span class="_ _2"></span> <span class="_ _2"></span>//code<span class="_ _2"></span>.jquery.com<span class="_ _2"></span>/ui/1.10.4/jqu<span class="_ _2"></span>ery-ui.js"<span class="_ _2"></span> &gt;&lt;/script&gt;</div><div class="t m0 x2 h8 y18 ff3 fs4 fc0 sc0 ls0 ws0"> &lt;script&gt;</div><div class="t m0 x2 h8 y19 ff3 fs4 fc0 sc0 ls0 ws0"> $(docu<span class="_ _2"></span>ment).ready<span class="_ _2"></span>(function () <span class="_ _2"></span>{</div><div class="t m0 x2 h8 y1a ff3 fs4 fc0 sc0 ls0 ws0"> $( '<span class="_ _8"></span> #<span class="_ _2"></span>&lt;%=Button1<span class="_ _2"></span>.ClientID %&gt;<span class="_ _2"></span>' )<span class="_ _2"></span>.click(functio<span class="_ _2"></span>n () {</div><div class="t m0 x2 h8 y1b ff3 fs4 fc0 sc0 ls0 ws0"> $.a<span class="_ _2"></span>jax({</div><div class="t m0 x2 h8 y1c ff3 fs4 fc0 sc0 ls0 ws0"> <span class="_ _2"></span>type: "<span class="_ _2"></span> <span class="_ _2"></span>POST"<span class="_ _2"></span> ,</div><div class="t m0 x2 h8 y1d ff3 fs4 fc0 sc0 ls0 ws0"> <span class="_ _2"></span>url: "<span class="_ _2"></span> <span class="_ _2"></span>WebF<span class="_ _2"></span>orm1.aspx/<span class="_ _2"></span>ServerSideM<span class="_ _2"></span>ethod" ,</div><div class="t m0 x2 h8 y1e ff3 fs4 fc0 sc0 ls0 ws0"> <span class="_ _2"></span>data: JSON.<span class="_ _2"></span>stringify({ <span class="_ _2"></span>'<span class="_ _8"></span> <span class="_ _2"></span>p' <span class="_ _2"></span>: $( ' #Text1' ).val()<span class="_ _2"></span> }),</div><div class="t m0 x2 h8 y1f ff3 fs4 fc0 sc0 ls0 ws0"> <span class="_ _2"></span>contentType<span class="_ _2"></span>: "<span class="_ _2"></span> <span class="_ _2"></span>application<span class="_ _2"></span>/json; chars<span class="_ _2"></span>et=utf-8" ,</div><div class="t m0 x2 h8 y20 ff3 fs4 fc0 sc0 ls0 ws0"> <span class="_ _2"></span>dataType: <span class="_ _2"></span>"<span class="_ _2"></span> <span class="_ _2"></span>json<span class="_ _2"></span>"<span class="_ _8"></span> ,</div><div class="t m0 x2 h8 y21 ff3 fs4 fc0 sc0 ls0 ws0"> <span class="_ _2"></span>async: true ,</div><div class="t m0 x2 h8 y22 ff3 fs4 fc0 sc0 ls0 ws0"> <span class="_ _2"></span>cache: false ,</div><div class="t m0 x2 h8 y23 ff3 fs4 fc0 sc0 ls0 ws0"> <span class="_ _2"></span>success: fu<span class="_ _2"></span>nction (msg<span class="_ _2"></span>) {</div><div class="t m0 x2 h8 y24 ff3 fs4 fc0 sc0 ls0 ws0"> <span class="_ _2"></span> $( ' #m<span class="_ _2"></span>yDiv'<span class="_ _2"></span> ).text(msg<span class="_ _2"></span>.d);</div><div class="t m0 x2 h8 y25 ff3 fs4 fc0 sc0 ls0 ws0"> <span class="_ _2"></span>},</div><div class="t m0 x2 h8 y26 ff3 fs4 fc0 sc0 ls0 ws0"> <span class="_ _2"></span>error: functio<span class="_ _2"></span>n (x, e) { ale<span class="_ _2"></span>rt(x.respons<span class="_ _2"></span>eText); }</div><div class="t m0 x2 h8 y27 ff3 fs4 fc0 sc0 ls0 ws0"> })</div><div class="t m0 x2 h8 y28 ff3 fs4 fc0 sc0 ls0 ws0"> <span class="_ _2"></span>return<span class="_ _2"></span> fa<span class="_ _2"></span>lse ;</div><div class="t m0 x2 h8 y29 ff3 fs4 fc0 sc0 ls0 ws0"> });</div><div class="t m0 x2 h8 y2a ff3 fs4 fc0 sc0 ls0 ws0"> });</div><div class="t m0 x2 h8 y2b ff3 fs4 fc0 sc0 ls0 ws0"> &lt;/script&gt;</div><div class="t m0 x2 h6 y2c ff1 fs3 fc0 sc0 ls0 ws0">&#31532;&#19977;&#27493;<span class="_ _9"></span>&#31532;&#19977;&#27493;</div><div class="t m0 x2 ha y2d ff4 fs2 fc0 sc0 ls0 ws0">WebForm<span class="_ _2"></span>1.aspx.c<span class="_ _2"></span>s</div><div class="t m1 x5 h9 y2d ff1 fs5 fc0 sc0 ls0 ws0">&#20013;&#30340;</div><div class="t m0 x6 h5 y2d ff1 fs2 fc0 sc0 ls0 ws0">&#26381;&#21153;&#22120;&#31471;<span class="_ _2"></span>&#26041;&#27861;&#21518;<span class="_ _2"></span>&#36319;<span class="ff3 fs4">WebMe<span class="_ _2"></span>thod</span>&#23646;&#24615;&#65306;</div><div class="t m0 x2 h7 y2e ff3 fs2 fc0 sc0 ls0 ws0">C ++</div><div class="t m0 x2 h8 y2f ff3 fs4 fc0 sc0 ls0 ws0">[ <span class="ff2">WebMethod<span class="_ _2"></span></span> ]</div><div class="t m0 x2 h8 y30 ff3 fs4 fc0 sc0 ls0 ws0">public <span class="_ _2"></span>static string S<span class="_ _2"></span>erverSideM<span class="_ _2"></span>ethod(string<span class="_ _2"></span> p)</div><div class="t m0 x2 h8 y31 ff3 fs4 fc0 sc0 ls0 ws0">{</div><div class="t m0 x2 h8 y32 ff3 fs4 fc0 sc0 ls0 ws0"> return "<span class="_ _2"></span> <span class="_ _2"></span>Mes<span class="_ _2"></span>sage from <span class="_ _2"></span>Server"<span class="_ _2"></span> +p ;</div><div class="t m0 x2 h8 y33 ff3 fs4 fc0 sc0 ls0 ws0">} </div><div class="t m0 x2 h4 y34 ff1 fs1 fc0 sc0 ls0 ws0">&#20852;&#36259;&#28857;<span class="_ _a"></span>&#20852;&#36259;&#28857;</div><div class="t m0 x2 h5 y35 ff1 fs2 fc0 sc0 ls0 ws0">&#26381;&#21153;&#22120;&#31471;<span class="_ _2"></span>&#26041;&#27861;&#24517;<span class="_ _2"></span>&#39035;&#26159;<span class="ff3 fs4">static</span>&#24182;&#19988;&#24517;<span class="_ _2"></span>&#39035;&#20197;<span class="ff3 fs4">[W<span class="_ _2"></span>ebMethod]</span>&#23646;&#24615;&#20316;<span class="_ _2"></span>&#20026;&#21069;&#32512;<span class="_ _2"></span>&#12290;</div></div></div><div class="pi" data-data='{"ctm":[1.611639,0.000000,0.000000,1.611639,0.000000,0.000000]}'></div></div></body></html>
评论
    相关推荐
    • jQuery各大云服务器门户幻灯片轮播
      jQuery各大云服务器门户幻灯片轮播
    • jQuery服务器购买抽奖活动源代码
      jQuery服务器购买抽奖活动源代码是一款红色的九宫格抽奖源代码下载。
    • jquery i18n
      jquery-i18n-properties,实现web多语言,并实现了持久化,代码需要在服务器中访问。
    • JQuery 及插件实现图片剪切分割上传服务器
      最近做一个项目的图像上传功能,这个功能就是类似与大型网站的图像上传功能。上传切割主要是相对于起点的四个偏移量,left、top、width、height值,然后在后台进行切割显示给会员。
    • jQuery饼状图服务器资源图表统计代码
      jQuery饼状图服务器资源图表统计代码,一款展示服务器新的访问,跳出率,负载等资源使用情况图表统计数据代码。
    • jQuery饼图服务器资源统计代码.zip
      jQuery饼图服务器资源统计代码是一款服务器新的访问,跳出率,负载,使用情况等canvas图表统计数据模板代码。
    • jquery.easing
      请将脚本上传到您自己的服务器并更新指向gsgd.co.uk任何 url 以使用该版本的文件,或者您可以尝试将上述 url 用于 CDN(尽管目前只有 1.3 缓动脚本,请查看了解更多信息,也许可以尝试添加任何丢失的文件/仍在使用...
    • jquery.Thailand.js:服务器端!
      jquery.Thailand.js งใช้ย!รอกที่อยู่ที่ดีที่สุดในไทยไม่ต้องใช้服务器端! อ่านแนวคิดและที่มาที่ไป ต้องการปรับปรุงฐรข...
    • jQuery饼图服务器资源统计特效代码
      jQuery饼图服务器资源统计代码是一款服务器新的访问,跳出率,负载,使用情况等canvas图表统计数据模板代码。
    • GaussDB_100_1.0.1-DATABASE-REDHAT-64bit.tar.gz
      guassdb100在redhat上安装包,单机部署的包,安装步骤请看我的文中介绍,经过大量实验搭建总结出来的文档