随笔分类 -  JavaScript

常用的JS代码片段记录
摘要:JS焦点图库 myFocus v2.0.2http://www.cosmissy.com/myfocus/tutorials.html 阅读全文
posted @ 2012-09-21 10:56 hm21 阅读(216) 评论(0) 推荐(0)
摘要:http://www.javascript100.com/chm/设为首页和加入收藏Tab选项卡功能下拉菜单功能文字或图片无缝滚动焦点图轮换功能折叠菜单功能select控件联动PNG24图片透明在线联系浮动层 阅读全文
posted @ 2012-09-21 10:55 hm21 阅读(302) 评论(0) 推荐(0)
摘要:JavaScriptvar $ = function (id) { return "string" == typeof id ? document.getElementById(id) : id;};var Class = { create: function() { return function() { this.initialize.apply(this, arguments); } }}Object.extend = function(destination, source) { for (var property in source) { ... 阅读全文
posted @ 2012-09-20 14:26 hm21 阅读(200) 评论(0) 推荐(0)
摘要:Hhtml<ul id="wenchuan"><li>001</li><li>002</li><li>003</li><li>004</li><li>005</li><li>006</li><li>007</li><li>008</li><li>000</li></ul>JavaScript<script type="te 阅读全文
posted @ 2012-09-20 10:17 hm21 阅读(257) 评论(0) 推荐(0)
摘要:XHtml<label><input type="checkbox" name="abc" onclick="checkall(this.form)" value="checkbox" />全选</label>JavaScript<script language="javascript">function checkall(form) { var c = 'abc'; for(var e = 0; e < form.eleme 阅读全文
posted @ 2012-09-20 10:15 hm21 阅读(132) 评论(0) 推荐(0)
摘要:xhtml<body><span id="boxs"></span><a href="javascript:boxs(1);">点这里测试一下</a></body>CSS<style>*{ padding:0; margin:0; font-size:12px;}/*这里将所有HTML标签的padding和marging以及font属性全部统一*/#bg{background:#000000;opacity: 0.5;-moz-opacity:0.5; filter:al 阅读全文
posted @ 2012-09-20 10:11 hm21 阅读(1250) 评论(0) 推荐(0)
摘要:html代码<input type="text" id="testInput" name="testInput" value="4234324234" /><div id="buttonBox"> <button onclick="copy('testInput')">copy</button></div>JS文件<script>function $(id){ return documen 阅读全文
posted @ 2012-09-20 10:05 hm21 阅读(1416) 评论(0) 推荐(0)