共 28 篇文章 |
|
如何优化JavaScript脚本的性能。什么叫使用直接量,比如,JavaScript支持使用[param,param,param,...]来直接表达一个数组,以往我们都使用new Array(param,param,...),使用前者是引擎直接解释的,后者要调用一个Array内部构造器,所以要略微快一点点。对字符串进行循环操作,譬如替换、查找,应使用正则表达式,因为本身JavaScript的循环速度... 阅628 转11 评0 公众公开 06-03-12 08:35 |
<div id="screen-switcher"></div><div id="print-switcher"></div><form action=""><fieldset><label for="select-screen-switcher"><span>Screen styles</span><select id="select-screen-switcher"><option value="... 阅284 转2 评0 公众公开 06-02-27 01:46 |
We apply that image to the background of our #header container (instead of the yellow color we had), push the background image to the bottom of the element, and use a background color matching the top of this new image.padding:5px 15px 4px 6px;background:url("left.gif")no-repeat left top;margin:0;padding:0 0... 阅404 转2 评0 公众公开 06-02-27 01:35 |
background:url("left_both.gif")no-repeat left top;margin:0;padding:0 0 0 9px;border-bottom:1px solid #765;}#header a {float:left;display:block;background:url("right_both.gif")no-repeat right top;padding:5px 15px 4px 6px;text-decoration:none;font-weight:bold;color:#765;}#home #nav-home, #news #nav-n... 阅542 转2 评0 公众公开 06-02-27 01:34 |
In order to get to the right bottom frame, we need to go up to the parent of the current frame (right column) and then choose the second frame (frames[1]).<HTML><HEAD><TITLE> right file </TITLE></HEAD><FRAMESET ROWS="50%,30%,*"><FRAME SRC="lefttop.html" NAME=&... 阅552 转2 评0 公众公开 06-02-25 15:51 |
<HTML> <HEAD> <TITLE>Canvas</TITLE> </HEAD> <FRAMESET COLS="200, *"> <FRAME SRC="frame1.html" NAME="leftcolumn"> <FRAMESET ROWS="100, *"> <FRAME SRC="frame2.html" NAME="toprow"> <FRAME SRC="frame3.... 阅420 转2 评0 公众公开 06-02-25 15:48 |
JavaScript and Frames, Part I (2)Escaping Frames.If the topmost page doesn‘t feature any frames, the object model has only one level of window objects, so top is equal to window. However, if the browser is currently displaying a frame-based document, each child frame has a corresponding window object. 阅365 转2 评0 公众公开 06-02-25 15:45 |
<A HREF="frame4new.html" TARGET="bottomrow"onClick="parent.frames[1].location.href = ‘frame4new.html‘;return true;">Multiple Load #1</A><A HREF="javascript:void(parent.frames[1].location.href=‘frame4new.html‘);void(parent.frames[2].location.href=‘frame4new.html‘)... 阅823 转2 评0 公众公开 06-02-25 15:42 |
在使用 form 里的那些元素对象之前,首先你必须要引用 form 对象才行,因为 form 对象是那些对象的父对象,而 form 对象前边也要引用它的上一层父对象 document,这种层层引用是很重要的:document.forms[0] // 指向页面中的第一个 form 对象 document.forms["order"] // 指向名为 order 的 form 对象,即<FORM>标记中包含有代... 阅1620 转34 评0 公众公开 06-02-23 17:38 |