JavaScriptʵÏÖˮƽѡÏЧ¹û
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication2._Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title></title>
<style>
#panel{
border:1px solid #0066CC;
height:400px;
width:786px;
position:relative;
}
#main{
position:relative;
top:32px;
left:0;
background:#FFFFCC;
height:300px;
}
.slide{
position:absolute;
left:1px;
top:1px;
display:none;
}
.show{
position:absolute;
left:1px;
top:1px;
display:block;
}
ul#menu {
color:#808080;
padding:0;
margin:0;
list-style:none;
font-family:"Courier New", Courier, monospace;
font-size:12px;
/*--------------------
½â¾ö IE ²»¼æÈÝÎÊÌâ
---------------------*/
position:absolute; !important
left:0;
top:0;
}
#menu li{
/*padding:14px 18px 14px 18px;*/
width:130px;
height:30px;
color:#444;
float:left;
border-top:1px solid #666666;
border-right:1px solid #666666;
border-bottom:1px solid #666666;
text-align:center;
line-height:30px;
margin:0;
padding:0;
}
/*
#menu li a{
background:#f8f8f8;
color:#808080;
text-decoration:none;
display:block;
width:130px;
height:30px;
}*/
#menu li a:hover{
color:#000;
background:#f8f8f8;
background-color:#CCCCCC
}
ul.news {
list-style:none;
margin:10px 20px;
}
.news li{
padding:4px;
}
.news li a:link, .news li a:visited{
text-decoration:none;
color:#993333;
display:block;
width:
Ïà¹ØÎĵµ£º
--------------------------------------------------------------------------------
<body>
<mce:script type="text/javascript"><!--
document.write("Èç¹ûÏÔʾÁËÕâ¶ÎÎÄ×Ö£¬ÄÇôÄúµÄä¯ÀÀÆ÷Ö§³Ö JavaScript£¡")
// --></mce:script>
<noscript>No JavaScript support!</noscript&g ......
javascriptµÄϵͳº¯Êý
1£¬encodeURI·½·¨
·µ»Ø¶ÔÒ»¸öURI×Ö·û´®±àÂëÖеĽá¹û£¬±¾ÖÊÊÇUTF-8±àÂë
eg:
var urlStr = encodeURI('http://fanli.qq.com/index.html?a=ddd&msg=Öйú');
alert(urlStr);
2, decodeUR ......
Javascriptº¯ÊýÀàÐÍÅжÏÍêÃÀ½â¾ö·½°¸
ÔÚÅжϺ¯ÊýÀàÐÍʱ£¬ÎÒÃÇͨ³£Ê¹ÓÃtypeof·½·¨£¬Ò»°ãÇé¿öÏ£¬Ëü»áµÃµ½ÎÒÃÇËùÔ¤ÏëµÄЧ¹û¡£µ«ÊÇ£¬ÓÐһЩϸ½Ú²¢²»ÎªÎÒÃÇËùÊìÖª¡£John Resig ÔÚ·ÖÎöÁËÕâЩϸ½ÚÖ®ºó£¬ÎªÎÒÃÇÌṩÁËÒ»¸öÍêÃÀµÄ½â¾ö·½°¸£¬±¾ÎĽ«×÷Ïêϸ½éÉÜ£º
Ò»¡¢´«Í³·½·¨²»ÎªÈËËùÖªµÄϸ½Ú
ºÁÎÞÒÉÎÊ£¬ÔÚÅжϺ¯ÊýÀàÐÍʱ£¬ÎÒÃÇÊ ......
! È¥³ý×Ö·û´®Á½¶Ë¿Õ¸ñµÄ´¦Àí
¡¡¡¡Èç¹û²ÉÓô«Í³µÄ·½Ê½,¾ÍÒª¿ÉÄܾÍÒª²ÉÓÃÏÂÃæµÄ·½Ê½ÁË
¡¡¡¡//Çå³ý×ó±ß¿Õ¸ñ
¡¡¡¡function js_ltrim(deststr)
¡¡¡¡{
¡¡¡¡if(deststr==null)return "";
¡¡¡¡var pos=0;
¡¡¡¡var retStr=new String(deststr);
¡¡¡¡if (retStr.lenght==0) return retStr;
¡¡¡¡while (retStr.substring(pos, ......
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= ......