摘要: 阅读全文
posted @ 2012-09-25 19:18 sirzxj 阅读(173) 评论(3) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2012-09-18 09:09 sirzxj 阅读(123) 评论(0) 推荐(0) 编辑
摘要: iframe在实际开发中应该算是比较常见的,在一些情况下iframe的高度是不确定,甚至是时时变化的一般这种情况会有下面几种情况:1、父页面和iframe页面在同一个域下,这种情况最好解决。在iframe页面里通过window.parent即可定位到父页面的window对象,然后,通过定时器来检测iframe页面的高度变化,来设置父页面的相应容器的高度即可。实例代码:父页面: 1 <!DOCTYPE HTML> 2 <html lang="en-US"> 3 <head> 4 <meta charset="UTF-8&qu 阅读全文
posted @ 2012-04-28 15:38 sirzxj 阅读(8956) 评论(3) 推荐(1) 编辑
摘要: 页面中可能会有这种需求,一个文本框,刷新或者浏览器重启之后,里面的内容仍然保留着。传统的cookie因为其容量有限,难以满足要求。考虑到现代浏览器(非IE)一般都是支持html5的,可以利用本地存储的方法实现 localStorage.setItem('key','Hello World'); var value = localStorage.getItem('key'); IE早期的版本不支持这种方式,但是可以通过另外一种方式来实现:首先设置一个html元素的style属性:<div id="dataStore"> 阅读全文
posted @ 2012-02-11 23:30 sirzxj 阅读(492) 评论(0) 推荐(1) 编辑
摘要: <!DOCTYPE HTML><html lang="en-US"><head> <meta charset="GBK"> <title>歪歪五子棋盘</title> <style type="text/css"> *{margin:0;padding:0;} td{width:25px;height:25px;border:solid 1px Gray;background:rgb(182,132,93);cursor:pointer;} table 阅读全文
posted @ 2011-12-23 17:37 sirzxj 阅读(312) 评论(0) 推荐(0) 编辑
摘要: var $ = jQuery = window.jQuery = function(){ return new jQuery.fn.init();}jQuery.fn = jQuery.prototype = { init:function(){ return this; }, size:function(){ alert("size"); }, jquery:"1.0.0"}jQuery.fn.init.prototype = jQuery.fn;jQuery().size();alert($().jquery); 阅读全文
posted @ 2011-12-06 11:02 sirzxj 阅读(365) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE HTML><html lang="en-US"><head> <meta charset="UTF-8"> <title></title></head><body> <script type="text/javascript"> function func(o){ alert(o+"-----No JJ"); } (function(){ var js = document.createE 阅读全文
posted @ 2011-11-05 10:09 sirzxj 阅读(266) 评论(0) 推荐(1) 编辑
摘要: sss 阅读全文
posted @ 2011-11-04 17:09 sirzxj 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 1 <!DOCTYPE HTML> 2 <html lang="en"> 3 <head> 4 <meta charset="GBK" /> 5 <title></title> 6 <script type="text/javascript" src="kissy.js"></script> 7 <script type="text/javascript"> 8 KISSY.ready(f 阅读全文
posted @ 2011-10-23 21:00 sirzxj 阅读(300) 评论(0) 推荐(0) 编辑
摘要: 1 <!DOCTYPE HTML> 2 <html lang="en"> 3 <head> 4 <meta charset="GBK" /> 5 <title></title> 6 <style type="text/css"> 7 #div2{ 8 background:red; 9 height:300px;10 width:300px;11 margin:300px;12 } 13 </style>14 <script typ. 阅读全文
posted @ 2011-10-23 17:20 sirzxj 阅读(1387) 评论(0) 推荐(0) 编辑