码家

Web Platform, Cloud and Mobile Application Development

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

2013年6月6日

摘要: 1 ///获取url中指定参数 2 // <param name="paras">参数名称</param> 3 /// 4 function request(paras) { 5 var url = location.href; 6 var paraString = url.substring(url.indexOf("?") + 1, url.length).split("&"); 7 var paraObj = {} 8 for (i = 0;... 阅读全文
posted @ 2013-06-06 08:35 海山 阅读(480) 评论(0) 推荐(0)

摘要: <a href="#ct1">跳转到词条1</a><a href="#ct2">跳转到词条2</a><br><div id="ct1" style="height:1000px;">词条1</div><div id="ct2">词条2</div>底下定好容器的id,在a的href中用#+id,就可以实现跳转了。 阅读全文
posted @ 2013-06-06 08:26 海山 阅读(1157) 评论(0) 推荐(0)

摘要: http://wawa129.iteye.com/blog/14882211:ajax自已构造一个url,这种方式传参数要用Data,不能用于表单提交。 例: function createHtml(id){ $("#reloading").show(); //edit_bg是个div,提交时显示,这样可以使背景页面不能操作。 $("#edit_bg").show(); $.ajax({ type: "POST", url: "pageAction!createHtml.action", data: "i 阅读全文
posted @ 2013-06-06 08:14 海山 阅读(7394) 评论(0) 推荐(0)

摘要: 1ajax是首选2iframe也可以考虑 阅读全文
posted @ 2013-06-06 08:08 海山 阅读(282) 评论(0) 推荐(0)

摘要: http://evan0625.iteye.com/blog/617004<html> <head> <script type="text/javascript" src="js/jquery.js"></script> <script type="text/javascript"> function getOtherMessage(){ $.ajax({ type:"post", url:"${pageContext.request.conte 阅读全文
posted @ 2013-06-06 08:07 海山 阅读(511) 评论(0) 推荐(0)

摘要: http://zy116494718.iteye.com/blog/786025Ajax和iframe都可以实现局部刷新。他们实现的功能基本一样。 下面是一个用jquery实现的Ajax局部刷新。实现的功能是在文本框中输入年龄后,在下面的<div>中显示出数据库中该年龄的所有用户姓名ajaxshuaxin.jsp:<script type="text/javascript"> $(function(){$("input:eq(1)").click(function(){ $("#show").html(&quo 阅读全文
posted @ 2013-06-06 08:02 海山 阅读(24097) 评论(0) 推荐(1)