09 2012 档案
firefox下实现document.all,得到所有元素
摘要:if(!document.all){ document.all = function(id) { var all = document.getElementsByTagName("*"); var results = new Array(); for(var i = 0; i < all.length; i++) { if(all[i].id == id) { results.push(all[i]); } } return results; }} var b = document.all("a");alert(b.length);firefox下 阅读全文
posted @ 2012-09-18 09:29 Black Bean 阅读(234) 评论(0) 推荐(0)
如何用div+css布局页面
摘要:如今web2.0炒的很厉害,先不去管它web2.0究竟是什么东西,反正div+css好像是火的不行了.各大知名站点都赶时髦似的把原来的表格布局翻 新成了div+css,并美其名曰"本站符合w3c标准",以便让别人觉得他们的网站用的是最先进的技术.div布局真有那么先进么?这个问题仍在争论之 中.在这里咱们不参与这种无聊的争论,学会它自己感觉一下不就清楚了么? 实际上div布局并不是什么高深的东西,如果你知道一点css就变得更简单了.首先我要说明几点: 1.这里的div并不是我们所说的层,虽然他们的标签都是<div>,在这里你可以把div理解成一个容器,它可以放文 阅读全文
posted @ 2012-09-14 14:33 Black Bean 阅读(265) 评论(0) 推荐(0)
Jquery取得iframe中元素的几种方法Javascript Jquery获取Iframe的元素、内容或者ID,反之也行!
摘要:query取得iframe中元素的几种方法在iframe子页面获取父页面元素代码如下:$('#objId', parent.document);// 搞定...在父页面 获取iframe子页面的元素代码如下:$("#objid",document.frames('iframename').document)显示iframe中body元素的内容。$(document.getElementById('iframeId').contentWindow.document.body).html()$("#testId" 阅读全文
posted @ 2012-09-11 17:59 Black Bean 阅读(1448) 评论(0) 推荐(1)
js中window.location.href,location.href,parent.location.href,top.location.href的用法
摘要:"window.location.href"、"location.href"是本页面跳转"parent.location.href"是上一层页面跳转"top.location.href"是最外层的页面跳转举例说明:如果A,B,C,D都是jsp,D是C的iframe,C是B的iframe,B是A的iframe,如果D中js这样写 "window.location.href"、"location.href":D页面跳转"parent.location.href" 阅读全文
posted @ 2012-09-11 11:41 Black Bean 阅读(307) 评论(0) 推荐(0)
javascript---使用createElement动态创建HTML对象.窗体传值
摘要:转自:http://blog.csdn.net/fxh_hua/article/details/4433682 方便自己找1.创建链接<BODY><script language="JavaScript">var o = document.body;//创建链接function createA(url,text){var a = document.createElement("a");a.href = url;a.innerHTML = text;a.style.color = "red";o.appendCh 阅读全文
posted @ 2012-09-11 11:12 Black Bean 阅读(362) 评论(0) 推荐(0)
frameset里面的滚动条,让其自动适应大小
摘要:<frameset cols="70%,*" id="body" frameborder="0" border="0"> <frame src="flow_view_chartmodel.aspx" id="MiddleBody" > <frame src="FlowSetRight.aspx" scrolling="no" id="rightBody" > </frames 阅读全文
posted @ 2012-09-10 10:49 Black Bean 阅读(902) 评论(0) 推荐(0)
页面中的内容输出到word,并下载
摘要:将你要输出的内容放在asp:panel标签内,StringWriter tw =new StringWriter(); HtmlTextWriter hw =new HtmlTextWriter(tw); this.pan_content.RenderControl(hw); System.Web.HttpResponse response = System.Web.HttpContext.Current.Response; response.Clear(); response.ContentEncoding = System.Text.Encoding.GetEncoding("g 阅读全文
posted @ 2012-09-10 10:44 Black Bean 阅读(229) 评论(0) 推荐(0)