导航

2011年4月15日

摘要: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><title> New Document </title><style>img{border:0px; cursor:pointer;}</style><script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/ 阅读全文

posted @ 2011-04-15 13:17 Trible.H 阅读(2576) 评论(0) 推荐(0)

摘要: 图片撑破页面,相信大家会有被困扰的时候,或许是以前,或许是现在,但不要紧了,jquery帮你两行代码就解决问题,让图片被受控制。代码如下:$(document).ready(function(){var ywidth = 500;//初始最大宽度$(”img”).each(function(){ if($(this).width() > ywidth) { $(this).width(ywidth); }});});把它加到网页上立杆见影,让图片不在头痛。有的朋友可能会想查看大图,那没问题,再加几行代码,加个点击查看大图的效果。代码如下:$(document).ready(functio 阅读全文

posted @ 2011-04-15 13:11 Trible.H 阅读(3311) 评论(0) 推荐(0)

摘要: 1. $(document).ready(function() { 2. $('a[href*=#]').click(function() {3. if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,richard,'')4. && location.hostname == this.hostname) {5. var $target = $(this.hash);6. $target = $target.length && 阅读全文

posted @ 2011-04-15 11:57 Trible.H 阅读(330) 评论(0) 推荐(0)

摘要: window.location = "http://www.xxxxxxxx.net" 跳转后有后退功能其实应该是 window.location.hrefwindow.location.replace("http://www.xxxxxxxx.net") 跳转后没有后退功能window.open("http://www.xxxxxxxx.net") 要新的窗口打开链接这个一般用于简单的弹出页面,现在基本上都被屏蔽掉了window.location.reload();window.location = "/Admin/Use 阅读全文

posted @ 2011-04-15 11:22 Trible.H 阅读(32774) 评论(0) 推荐(0)