shirlly 发表于 2013-2-6 11:07:08

DOJO向服务器发送数据

1:Sending Data to the Server Using GET
<button dojoType="dijit.form.Button" id="helloButton">      Hello World!      <script type="dojo/method" event="onClick">      dojo.xhrGet({         url: 'HelloWorldResponseGET.jsp,         load: helloCallback,         error: helloError,         content: {name: dojo.byId('name').value }      });      </script>   </button>Please enter your name: <input type="text" id="name">
2:Sending Data to the Server Using POST
<form id="myForm" method="POST">      Please enter your name: <input type="text" name="name"></form><script type="dojo/method" event="onClick">      dojo.xhrGet({         url: 'HelloWorldResponseGET.jsp',         load: helloCallback,         error: helloError,         content: {name: dojo.byId('name').value }      });</script>
页: [1]
查看完整版本: DOJO向服务器发送数据