jQuery基础----22jQuery AJAX-加载片段
来源:互联网 发布:西城区2016年经济数据 编辑:程序博客网 时间:2024/06/07 08:11
box.htm:
<div style="width: 100px; height: 100px;background-color: coral"></div>
hellojs.js:
/** * Created by zsgjs038 on 2015/9/9. */function sayHello(){ alert("hello ajax");}
main.html:
<!DOCTYPE html><!--jQuery AJAX-加载片段--><html><head lang="en"> <meta charset="UTF-8"> <title></title> <script src="jquery-2.1.4.min.js"></script> <script src="main.js"></script></head><body></body></html>
main.js:
/** * Created by zsgjs038 on 2015/9/9. */$(document).ready(function(){ $("body").text("wait..."); $("body").load("box.htm",function(a,status,c){ console.log(status); if(status=="error"){ $("body").text("片段加载失败"); } });// 加载对话框文件 $.getScript("hellojs.js").complete(function(){ sayHello(); });})
源码下载:
http://download.csdn.net/detail/zhaihaohao1/9093153
0 0
- jQuery基础----22jQuery AJAX-加载片段
- jQuery的AJax异步加载片段
- jquery加载HTML片段
- jQuery基础---Ajax基础
- 动态加载jquery(代码片段)
- Jquery load()方法加载html片段
- 使用jquery实现动态加载片段
- jquery 片段
- jquery ajax基础
- JQuery-ajax基础篇
- jQuery和AJAX基础
- jQuery AJAX基础
- (Jquery 功能篇) Jquery ajax异步加载
- jquery ajax 加载超时提示
- JQuery实现Ajax加载图片
- jquery ajax 加载超时提示
- jquery异步加载之ajax
- jQuery+Ajax+PHP滚动加载
- Recover Rotated Sorted Array
- 【Django】上传图片之路径问题
- PS------裁剪工具的使用
- 用NAN简化Google V8 JS引擎的扩展
- jQuery基础----21jQuery AJAX-异步访问
- jQuery基础----22jQuery AJAX-加载片段
- jQuery基础----23jQuery扩展-jQuery扩展
- jQuery基础----24jQuery扩展-noConflict
- Spring学习笔记-springMVC基于注解的控制器(Demo)
- 寻找志同道合的伙伴
- WeakReference与SoftReference
- Confuse about hkQuaternion and hkRotation
- GPIO Interfaces
- Ogre+Havok研究------一、框架搭建