服务器_dojo 之基础篇(二)之从服务器读取数据,本例子沿用 "dojo 之基础篇" 中
<script type="text/javascript">
handler: helloCallback
本例子沿用 "dojo 之基础篇" 中的内容
function helloCallback(type, data, evt)
//处理返回数据的函数. 其三个参数是必需的.
dojo.require("dojo.io.*");
}
Welcome to the Dojo Hello World Tutorial
{
function helloPressed()
}
dojo.require("dojo.event.*");
}
dojo.addOnLoad(init);
dojo.require("dojo.widget.Button");
dojo.io.bind({
var helloButton = dojo.widget.byId('helloButton');
if (type == 'error')
{
function init()
//绑定url路径. 当然按下按钮后, 会向response.txt发送请求,此时,服务器
else
<!-- SECTION 3 -->
url: 'response.txt',
</script>以上为所有代码.
{
//将返回response.txt中的内容.这个url可以是其它的对象.比如struts中的
alert('Error when retrieving data from the server!');
dojo.require("dojo.widget.*");
将section 2的代码替换 为以下代码
alert(data);
//***.do 或者 是一个servlet url.
dojo.event.connect(helloButton, 'onClick', 'helloPressed')
相关热词: 服务器
本站内容来源于网络,如有侵权请与我们联系,我们会及时删除,我们深感抱歉!
注:本站所有信息仅供用于网络技术学习参考,学习中请遵循相关法律法规!
本文地址: https://v30.fanwenzhu.com/server/yun/5941.shtml
相关文章
热门TAG
win10 ecshop 主机 阿里云 解决 配置 C# C++ 解析 SQL语句 命令 Go语言 方法 CSS3 HTML5 CSS win7 MSSQL 服务器配置 IIS7.5 IIS7 IIS6 IIS CentOS 7 Linux oracle数据库 oracle phpcms discuz discuz教程最新文章
-
租用云服务器后的备案问
时间:2021-01-05
-
百度云服务器bcc有什么优
时间:2021-01-05
-
什么是云服务器cvm?怎么
时间:2021-01-05
-
云服务器怎么保证信息安
时间:2021-01-05
-
云服务器怎么预防被攻击
时间:2021-01-05
-
阿里云ECS实例设置用户r
时间:2020-12-29
-
阿里云ECS服务器入门使用
时间:2020-12-29
-
怎么配置云服务器
时间:2020-12-28
热门文章
-
租用云服务器后的备案问题你真的了解吗
时间:2021-01-05
-
选择美国云服务器需要关注什么?
时间:2020-12-27
-
阿里云服务器怎么买?阿里云服务器购买
时间:2020-12-25
-
运维必须知道的关于云服务器的十个问题
时间:2020-12-24
-
如何快速搭建一个阿里云服务器
时间:2020-12-24
-
什么是云?什么是云服务?什么是云主机
时间:2020-12-25
-
云服务器网站承载量一般有多大?一个云
时间:2020-12-28
-
浅谈云服务器和独立服务器的八大差异
时间:2020-12-24
-
SugarHosts云服务器如何开启访问端口和使用
时间:2020-12-24
-
云服务器是什么,云主机干什么用的?
时间:2020-12-28
