随笔分类 -  JavaScript

摘要:View Code 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <meta http-equiv="Content-Type" content="te 阅读全文
posted @ 2013-02-04 08:52 晓 漪 阅读(708) 评论(0) 推荐(1) 编辑
摘要:View Code 1 <div id="demo"> 2 <div id="indemo"> 3 <div id="demo1"> 4 <asp:Repeater ID="Pro_List" runat="server"> 5 <ItemTemplate> 6 <a href="/Product/html/<%#Eval("id") %>/" title="<% 阅读全文
posted @ 2013-01-07 12:28 晓 漪 阅读(2942) 评论(2) 推荐(0) 编辑
摘要:View Code 1 //实现checkbox的全选和取消 2 <script type="text/javascript"> 3 function all(all){ 4 var checkbox = document.getElementsByName("select"); 5 if (all.checked){ 6 for (i = 0;i<checkbox.length ;i++ ) 7 { 8 checkbox[i].checked = true; 9 ... 阅读全文
posted @ 2012-08-01 19:30 晓 漪 阅读(190) 评论(0) 推荐(0) 编辑
摘要:View Code 1 //实现局部遮罩 2 <script type="text/javascript"> 3 function Shade(){ 4 var s = document.getElementById("shade"); 5 s.style.display = "block"; 6 } 7 function Display(){ 8 var d = document.getElementById("shade"); 9 d.style.display = "none" 阅读全文
posted @ 2012-08-01 19:25 晓 漪 阅读(462) 评论(0) 推荐(0) 编辑
摘要:View Code 1 //有两个按钮分别响应两个事件,用来控制iframe显示的网页。 2 <script type="text/javascript"> 3 function bd(){ 4 var baidu = document.getElementById("i"); 5 baidu.src = "http://www.baidu.com"; 6 } 7 function xl(){ 8 var sina = document.getElementById("i"); 9 sina.src = 阅读全文
posted @ 2012-08-01 19:22 晓 漪 阅读(781) 评论(0) 推荐(0) 编辑
摘要:1 <script> 2 function changecolor(dom){ 3 dom.style.backgroundColor = "gray"; 4 } 5 function changeback(dom){ 6 dom.style.backgroundColor = "green"; 7 } 8 </script> 9 <style type="text/css">10 div{11 width:200px;12 height:200px;13 border:... 阅读全文
posted @ 2012-07-31 19:47 晓 漪 阅读(184) 评论(0) 推荐(0) 编辑
摘要:1 function Clock(){ 2 var date = new Date(); 3 var year = date.getFullYear(); 4 var month = date.getMonth()+1; 5 var day = date.getDate(); 6 var week = date.getDay(); 7 var hour = date.getHours(); 8 var minute = date.getMinutes(); 9 var second = date.getSeconds();1... 阅读全文
posted @ 2012-07-31 19:36 晓 漪 阅读(155) 评论(0) 推荐(0) 编辑