dannyr's Blog
ActionScript ColdFusion Delphi Flex Java .Net —— 一个都不能少!
博客园
首页
新闻
新随笔
联系
管理
订阅
随笔- 95 文章- 3 评论- 329
Spry Framework入门(一)——XML数据集及显示
简介
:
Spry Framework是Adobe出品的轻量级的支持Ajax的JavaScript库,以HTML为中心,使用最基本的HTML、CSS和JavaScript来实现丰富Web页面体验。
试验环境
:
操作系统:windows2003 Server
浏览器:IE7.0 RC1 FireFox 1.5.0.7
WEB服务器:IIS 6.0
Spry库:Spry_P1_3_08-11
安装
:
从
http://labs.adobe.com/technologies/spry/
下载安装包,目前版本为Spry_P1_3_08-11.zip,解开后把includes目录复制到自己的IIS虚拟目录上即可。
页面代码
:
data.xml
<?
xml version="1.0" encoding="UTF-8"
?>
<
specials
>
<
menu_item
id
="1"
>
<
item
>
夏日沙拉
</
item
>
<
description
>
organic butter lettuce with apples, blood oranges, gorgonzola, and raspberry vinaigrette.
</
description
>
<
price
>
7
</
price
>
<
url
>
summersalad.xml?id=1
</
url
>
</
menu_item
>
<
menu_item
id
="2"
>
<
item
>
Thai Noodle Salad
</
item
>
<
description
>
lightly sauteed in sesame oil with baby bok choi, portobello mushrooms, and scallions.
</
description
>
<
price
>
8
</
price
>
<
url
>
thainoodles.xml
</
url
>
</
menu_item
>
<
menu_item
id
="3"
>
<
item
>
Grilled Pacific Salmon
</
item
>
<
description
>
served with new potatoes, diced beets, Italian parlsey, and lemon zest.
</
description
>
<
price
>
16
</
price
>
<
url
>
salmon.xml
</
url
>
</
menu_item
>
</
specials
>
test.html
1
<
head
>
2
<
meta
http-equiv
="Content-Type"
content
="text/html; charset=UTF-8"
/>
3
<
title
>
Spry Example
</
title
>
4
5
<!--
Link the Spry libraries
-->
6
<
script
type
="text/javascript"
src
="includes/xpath.js"
></
script
>
7
<
script
type
="text/javascript"
src
="includes/SpryData.js"
></
script
>
8
9
<!--
Create a data set object
-->
10
<
script
type
="text/javascript"
>
11
var
dsSpecials
=
new
Spry.Data.XMLDataSet(
"
data.xml
"
,
"
specials/menu_item
"
);
12
</
script
>
13
</
head
>
14
15
<
body
>
16
17
<!--
Create the Spry dynamic region
-->
18
<
div
id
="Specials_DIV"
spry:region
="dsSpecials"
>
19
<!--
Display the data in a table
-->
20
<
table
id
="Specials_Table"
>
21
<
tr
>
22
<
th
>
名称
</
th
>
23
<
th
>
Description
</
th
>
24
<
th
>
价格
</
th
>
25
</
tr
>
26
<
tr
spry:repeat
="dsSpecials"
>
27
<
td
>
{item}
</
td
>
28
<
td
>
{description}
</
td
>
29
<
td
>
{price}
</
td
>
30
</
tr
>
31
</
table
>
32
</
div
>
33
34
</
body
>
绿色通道:
好文要顶
关注我
收藏该文
与我联系
posted @ 2006-10-19 12:22
dannyr|一个都不能少!
阅读(4415)
评论(0)
编辑
收藏
注册用户登录后才能发表评论,请
登录
或
注册
,
返回博客园首页
。
首页
博问
闪存
新闻
园子
招聘
知识库
最新IT新闻
:
·
美国空军拟最多购买1.8万台iPad 2
·
伊朗封杀Gmail和Facebook等互联网服务
·
分析称专利之争让谷歌苹果两败俱伤
·
Android平台发现新型手机病毒Rootsmart
·
HTC首款Android4.0手机大曝光
»
更多新闻...
最新知识库文章
:
·
高级编程语言的发展历程
·
如何学习一门新的编程语言?
·
学习不同编程语言的重要性
·
为什么我喜欢富于表达性的编程语言
·
计算机专业的女生为什么要学编程
»
更多知识库文章...
China-pub 2011秋季教材巡展
China-Pub 计算机绝版图书按需印刷服务
公告
我的联系方式:
MSN dannyr@163.com
QQ 563178
20060606新计数器
Detail
昵称:
dannyr|一个都不能少!
园龄:
7年7个月
粉丝:
3
关注:
0
<
2006年10月
>
日
一
二
三
四
五
六
24
25
26
27
28
29
30
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
1
2
3
4
搜索
常用链接
我的随笔
我的评论
我的参与
最新评论
我的标签
更多链接
我的标签
memcache
(2)
cache
(2)
DipperRiver
(1)
随笔分类
.Net技术(24)
(rss)
C++(9)
(rss)
ColdFusion(5)
(rss)
Delphi(2)
(rss)
DevExpress(1)
(rss)
Flex技术(29)
(rss)
Java(4)
(rss)
Laszlo(9)
(rss)
Spry(9)
(rss)
生活随笔(10)
(rss)
杂项(13)
(rss)
随笔档案
2009年9月 (2)
2008年6月 (1)
2008年5月 (2)
2007年9月 (2)
2007年8月 (1)
2007年7月 (3)
2007年1月 (1)
2006年12月 (2)
2006年11月 (1)
2006年10月 (6)
2006年9月 (1)
2006年8月 (4)
2006年7月 (1)
2006年6月 (4)
2006年5月 (4)
2006年4月 (2)
2006年1月 (1)
2005年12月 (1)
2005年11月 (1)
2005年10月 (2)
2005年8月 (1)
2005年7月 (1)
2005年6月 (1)
2005年5月 (1)
2005年4月 (1)
2005年3月 (2)
2005年2月 (1)
2005年1月 (3)
2004年12月 (9)
2004年11月 (9)
2004年10月 (9)
2004年9月 (3)
2004年8月 (2)
2004年7月 (6)
2004年6月 (4)
文章分类
ColdFusion
(rss)
Flex技术(3)
(rss)
文章档案
2004年6月 (3)
我的链接
Trademan
(rss)
www.k-zone.cn
(rss)
呼呼堂
(rss)
牛皮糖
(rss)
最新评论
阅读排行榜
评论排行榜
推荐排行榜