全文预览

搞笑的年终总结报告ppt 快乐每时每刻

上传者:upcfxx |  格式:pdf  |  页数:34 |  大小:0KB

文档介绍
: 10px 0 10px -100px; } .main { border: 1px solid #000; } .nav, .sub { border: 1px dashed #000; height: 300px; } .sub { height: 280px; } </style> 宽度值不必精确到像素,示意即可。 4 请把以下用于连接字符串的 JavaScript 代码修改为更高效的方式 var htmlString =‘<div class= ” container ”>’+ ‘<ul id= ” news-list ”>’; for (var i= 0; i< NEWS.length; i++) { htmlString += ‘<li><a href= ”’+ NEWS[i].LINK + ‘”>+ NEWS[i].TITLE +‘</a></li> ’; } htmlString += ‘</ul></div> ’; 5 尝试实现注释部分的 Javascript 代码, 可在其他任何地方添加更多代码( 如不能实现, 说明一下不能实现的原因): var Obj = function(msg){ this.msg = msg; this.shout = function(){ alert(this.msg); } this.waitAndShout = function(){ // 隔五秒钟后执行上面的 shout 方法}}6 请编写一个 JavaScript 函数 toRGB , 它的作用是转换 CSS 中常用的颜色编码。要求: alert(toRGB("#0000FF")); // 输出 rgb(0, 0, 255) alert(toRGB("invalid")); // 输出 invalid alert(toRGB("#G00")); // 输出#G00

收藏

分享

举报
下载此文档