上一页 1 2 3 4 5 6 ··· 8 下一页
摘要: Jquery中获取iframe的方法大全在一下网页中,一些人会用到iframe,dom获取页面中的iframe还是很简单的:父窗口中操作iframe:window.frames["iframeChild"].document //假如iframe的id为iframeChild在子窗口中操作父窗口:window.parent.document那么,用如果想用jquery的方法,我们怎么用jquery来获取iframe呢?下面是一下收集来的方法。获取页面的对象其实就是dom方法外面加上jquery的选择符:父窗口中操作iframe:$(window.frames["i 阅读全文
posted @ 2012-09-28 11:17 陆航 阅读(826) 评论(0) 推荐(0) 编辑
摘要: 1.timeStamp 属性包含从 1970 年 1 月 1 日到事件被触发时的毫秒数。$("button").click(function(event){ $("span")html(event.timeStamp);});2.type 属性描述触发哪种事件类型。$(document).ready(function(){ $("p").bind('click dblclick mouseover mouseout',function(event){ $("div").html("事件:& 阅读全文
posted @ 2012-09-25 17:23 陆航 阅读(397) 评论(0) 推荐(1) 编辑
摘要: 1对于eq gt lt 这三种方法的参数也就是index的值 他们是从0开始的 在使用table 是时候 如果想将属性也就是列名过滤掉可以使用<thead>将属性的<tr>包裹起来 。<tbody>包裹剩余的值。从而可以达到"tbody tr:eq(2)"能选定第三个<tr> 还有就是这里的gt lt都不包括他们的值本身 也就是说 eq gt lt三者加起来构成全集2.:header 用于选定所有标题元素<h1> . <h6>3.:animated 用于选定所有的动画 还有用下面句子可以实现无限动画重复 阅读全文
posted @ 2012-09-25 14:34 陆航 阅读(220) 评论(0) 推荐(0) 编辑
摘要: 1.document.all是页面内所有元素的一个集合 、例如document.all(0)表示页面内的第一个元素2.document.all可以判断浏览器是否是IE3可以通过给某个元素设置id属性 然后使用document.all来访问。如<input name=aaa value = aaa><script>alert(document.all.aaa.value);</scritp> 阅读全文
posted @ 2012-09-24 11:26 陆航 阅读(168) 评论(0) 推荐(0) 编辑
摘要: $(function(){ $('tr.parent').click(function(){ // 获取所谓的父行 $(this) .toggleClass("selected") // 添加/删除高亮 .siblings('.child_'+this.id).toggle(); // 隐藏/显示所谓的子行 }).trigger("click");})与$(function(){ $('tr.parent').click(function(){ // 获取所谓的父行 $(this) .toggleClass 阅读全文
posted @ 2012-09-21 09:55 陆航 阅读(228) 评论(0) 推荐(0) 编辑
摘要: slow: 600毫秒normal: 400毫秒fast:200毫秒 阅读全文
posted @ 2012-09-20 10:10 陆航 阅读(314) 评论(0) 推荐(0) 编辑
摘要: 一般使用成$("p").css({"fontSize":"30px","backgroundColor":#888888});注意1.如果值时数字,将会被自动转化为像素值。2.在css()方法中,如果属性中带有“-”符号,例如font-size和background-color属性,如果在设置这些属性的值的时候不带引号,那么就得用驼峰式写法,例如:$("p").({fontSize:"30px",backgroundColor:"#888888"});如果 阅读全文
posted @ 2012-09-19 16:20 陆航 阅读(6568) 评论(0) 推荐(0) 编辑
摘要: 补充:color{background-color: #CC00FF; /*所有浏览器都会显示为紫色*/background-color: #FF0000\9; /*IE6、IE7、IE8会显示红色*/*background-color: #0066FF; /*IE6、IE7会变为蓝色*/ _background-color: #009933; /*IE6会变为绿色*/}好多css hack,最重要的是简单实用能解决问题就行了总结:\9: IE6 IE7 IE8*: IE6 IE7_: IE6*+: IE7---------------------------------------- IE6 阅读全文
posted @ 2012-09-18 16:57 陆航 阅读(197) 评论(0) 推荐(0) 编辑
摘要: setInterval(function (){ //用距离顶的高度 + (滚动的高度+100 - 距离顶的高度)乘0.1 me.style.top = parseInt(me.style.top) + (Math.max(document.body.scrollTop, document.documentElement.scrollTop) + _top - parseInt(me.style.top)) * 0.1 + 'px'; }, 10 + parseInt(Math.random()*20) ); //如果将这里的参数设置为10 + parseInt(Math.ra 阅读全文
posted @ 2012-09-18 11:04 陆航 阅读(177) 评论(0) 推荐(0) 编辑
摘要: mouseenter() 方法 只有在鼠标指针经过被选元素时(不包括鼠标指针经过任何子元素),才会触发 mouseenter 事件。mouseover ()方法在鼠标指针经过被选元素或者经过任何子元素时,都会触发 mouseover 事件。mouseenter() 与 mouseover() 的区别实例认清两都区别,对编写二级或多级导航菜单有 一定帮助区别mouseenter() 方法与 mouseover() 方法的实例:(下面内容放置页面BODY标签内即可运行,取消“ mouseover事件触发” 注释,再注释 “mousenter事件触发” 可进行效果对比,使用mouseover时,鼠标 阅读全文
posted @ 2012-09-17 15:00 陆航 阅读(211) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 8 下一页