jquery随记----ajax基于请求加载数据(追加html)
来源:互联网 发布:js 控制图片 90度旋转 编辑:程序博客网 时间:2024/05/16 06:46
******************************************************************************************************************************
load(url)加载url指定的网页
**********************************************************************************************************************************
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script type="text/javascript" src="jquery-1.6.2.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('#letter-a a').click(function(){
$('#dictionary').load('a.html');
alert("load……");
return false;
})
})
</script>
</head>
<body>
<div class="letters" style="float:left;">
<div class="letter" id="letter-a">
<h3><a href="#">A</a></h3>
</div>
<div class="letter" id="letter-b">
<h3><a href="#">B</a></h3>
</div>
<div class="letter" id="letter-c">
<h3><a href="#">C</a></h3>
</div>
<div class="letter" id="letter-c">
<h3><a href="#">D</a></h3>
</div>
</div>
<div id="dictionary" style="float:right;">
</div>
</body>
</html>
******************************************************************************************************************************
以下是:a.html
**********************************************************************************************************************************
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script type="text/javascript" src="jquery-1.6.2.js"></script>
<script type="text/javascript">
$(document).ready(function(){
alert(document.getElementById("radio1").value);
})
</script>
</head>
<body>
<div class="entry">
<h3 class="term">ABDICATION</h3>
<div class="part">n.</div>
<div class="definition">
An act whereby a soverign attests his sense of the high
temperature of the throne.
</div>
<div class="quote">
<div class="quote-line"> Poor Isabella's Dead,whose
abdication
</div>
<div class="quote-line"> Set all tongues wagging in the
Spanish nation
</div>
<div class="quote-line"> For that performance 'twere
unfair to scolf her:
</div>
<div class="quote-line"> She wisely left a throne too
hot to hold her.
</div>
<div class="quote-line"> To History she'll be no royal
riddle —
</div>
<div class="quote-line"> Merely a plain parched pea that
jumped the griddle.
</div>
<div class="quote-line"> G.J.</div>
</div>
<div class="entry">
<h3 class="term">ABSOLUTE</h3>
<div class="part">adj.</div>
<div class="definition">
Independent,irresponsible.An absolute monarchy is one
in which the sovereign does as he pleases so long as he
pleases the assassins.Not many absolute monarchies are
left,most of them having been replaced by limited
monarchies,where the soverign's power for evil (and for
good) is geratly curtailed.and by republics, which are
governed by chance.
</div>
</div>
</div>
</body>
</html>
- jquery随记----ajax基于请求加载数据(追加html)
- 加载页面时,ajax异步请求数据,$.each()遍历数据,通过jQuery将数据html()到dom结构中
- jQuery ajax数据请求
- ajax请求到后台数据,前台不用拼接字符串append追加HTML标签,一样显示到页面 (使用空模板)
- HTML的html()追加数据
- 组建基于JQuery的Ajax Web项目------ 持续追加
- AJax请求数据用Jquary向select追加<option>
- Jquery——Day4(Ajax进阶:加载请求、错误请求、请求全局事件、json/jsonp)
- dhtmlxCombo初始化加载,jquery请求加载数据
- dhtmlxGrid初始化加载,jquery请求加载数据
- 基于jQuery的AJAX请求Table显示
- js对js加载拼接的html代码中元素添加ajax方法请求后台数据
- jquery ajax请求返回xml,html,text,json,..数据实例详解
- Jquery 加载数据及请求数据方式
- (跨域)jquery.ajax提交请求并返回json数据
- 使用Ajax异步加载请求JSON数据
- 微信小程序ajax请求分页加载数据
- 基于jQuery的AJAX和JSON实现纯html数据模板
- DirectShow 学习之 CSource类和其一个具体实现例子的源代码分析
- google-perftools
- 敏捷个人2011.8月份线下活动报道:敏捷个人和敏捷结果,设计你的一天,设计你的一周
- MySQL出错代码:1067
- java性能优化
- jquery随记----ajax基于请求加载数据(追加html)
- MyEclipse Enterprise Workbench 9.0 破解及注册机
- build error in hudson
- sql语言结构与存储过程
- oracle学习之法
- 预处理指令
- C#逻辑判断输入值后返回提示信息。
- 一次性关闭模块中所有Activity但不关闭Service
- 你是否在生产正确的产品?