Ò»¸öcss javascriptµÄ¶þ¼¶ºáÏò²Ëµ¥
ÑÝʾµØÖ·: http://www.wowo-design.com/view/51_01/index.htm
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>css²Ëµ¥ÑÝʾ</title>
<style type="text/css">
<!--
*{margin:0;padding:0;border:0;}
body {
font-family: arial, ËÎÌå, serif;
font-size:12px;
}
#nav {
line-height: 24px; list-style-type: none; background:#666;
}
#nav a {
display: block; width: 80px; text-align:center;
}
#nav a:link {
color:#666; text-decoration:none;
}
#nav a:visited {
color:#666;text-decoration:none;
}
#nav a:hover {
color:#FFF;text-decoration:none;font-weight:bold;
}
#nav li {
float: left; width: 80px; background:#CCC;
}
#nav li a:hover{
background:#999;
}
#nav li ul {
line-height: 27px; list-style-type: none;text-align:left;
left: -999em; width: 980px; position: absolute; float:left;
}
#nav li ul li{
float: left; width: 80px;
background: #F6F6F6;
}
#nav li ul a{
display: block; width: 80px;text-align:center;
}
#nav li ul a:link {
color:#666; text-decoration:none;
}
#nav li ul a:visited {
color:#666;text-decoration:none;
}
#nav li ul a:hover {
color:#F3F3F3;text-decoration:none;font-weight:normal;
background:#C00;
}
#nav li:hover ul {
left: 0;
}
#nav li.sfhover ul {
left: 0;
}
#content {
clear: left;
}
-->
</style>
<script type=text/javascript><!--//--><![CDATA[//><!--
function menuFix() {
var sfEls = document.getElementById("nav").getElementsByTagName("li");
for (var i=0; i<sfEls.length; i++) {
sfEls[i].onmouseover=function() {
this.className+=(this.className.length>0? " ": "") + "sfhover";
&nb
Ïà¹ØÎĵµ£º
// s_id1: selectµÄid
var objSelect = document.getElementById(”s_id1”);
//»ñµÃË÷Òý
var indexSelect = objSelect .selectedIndex;
//»ñµÃselectÎı¾
var txtSelect = objSelect .options[index].text;
//»ñµÃselectÖµ
var valSelect = objSelect .options[index].value;
//¸Ä±äselect ......
// È¥µô×Ö·û´®×ó±ß¿Õ¸ñ
function trimToLeft(str){
var i;
for(i=0;i<str.length; i++) {
if(str.charAt(i)!=" ") break;
......
±¾ÎÄ×÷ÕßΪDavid
Mandelin£¬©¤©¤Mozilla JavaScriptÍŶӹ¤×÷ÈËÔ±¡£
Firefox 3.5ÓµÓÐÒ»¸öȫеÄJavaScriptÒýÇæ£¬½Ð×öTraceMonkey£¬ÔÚ¸ÃÒýÇæÉÏÅÜJSÓ¦ÓÃÒª±ÈFirefox
3¿ìµ½3-4±¶£¬´Ó¶øÎªÏÖÓеÄÍøÂçÓ¦ÓüÓËÙ¡£ÕâÆªÎÄÕ´óÖµÄÃèÊöÒ»ÏÂÔÚTraceMonkeyÖаüÀ¨µÄÖØÒª²¿¼þ£¬ÒÔ¼°ËûÃÇÊÇÈçºÎ¼ÓËÙJavaScriptµÄ¡£Í¬Ñù£¬ÔÚÁ˽âÕâÐ ......
ÎÒÃÇÓÐʱ»ñÈ¡ styl.widthΪ¿ÕµÄʱºò£¬¿ÉÒÔ»ñÈ¡cssÖеÄwidth..
µ«ie and ff ÊDz»Í¬µÄ¡£¡£
ie:
obj.currentStyle['width']
ff:
var css = document.defaultView.getComputedStyle(obj, null);
css.getPropertyValue('width') ......
1. oncontextmenu="window.event.returnValue=false" ½«³¹µ×ÆÁ±ÎÊó±êÓÒ¼ü
<table border oncontextmenu=return(false)> <td>no </table> ¿ÉÓÃÓÚTable
2. <body onselectstart="return false"> È¡Ïûѡȡ¡¢·ÀÖ¹¸´ÖÆ
3. onpaste="return false" ²»×¼Õ³Ìù
4. oncopy="return false;" oncut="re ......