javascript½¨±í
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_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>
</head>
<body>
<form id="form1" runat="server">
<div>
<center>
<p>
<font color="red">±ÏÒµ´ð±ç°²ÅÅ</font></p>
<table width="600" border="1" cellspacing="0" cellpadding="0" id="table1" style="text-align: center">
</table>
<script language="javascript" type="text/javascript">
// ´Ó×îÖÕµÄTextNode½Úµã¿ªÊ¼£¬ÂýÂýÐγÉ<tbody>½á¹¹
//var text = document.createTextNode("ÄÚÈÝ"); //н¨Ò»¸öTextNode½Úµã
//±íÍ·
var td1 = document.createElement("td"); //н¨tdÀàÐ͵ÄElement½Úµã
&nb
Ïà¹ØÎĵµ£º
ÔÚjsÀïÓõ½Êý×é,±ÈÈç ¶à¸öÃû×ÖÏàͬµÄinput, ÈôÊǶ¯Ì¬Éú³ÉµÄ, Ìύʱ¾ÍÐèÒªÅжÏÆäÊÇ·ñÊÇÊý×é.
if(document.mylist.length != "undefined" ) {} Õâ¸öÓ÷¨ÓÐÎó.
ÕýÈ·µÄÊÇ if( typeof(document.mylist.length) != "undefined" ) {}
»ò if( !isNaN(document.mylist.length) ) {}
typeofµÄÔËËãÊý䶨Òå,·µ»ØµÄ¾ÍÊÇ "un ......
½üÀ´¿´ÁËDeanµÄ“Convert any colour value to hex in MSIE”£¬ÖÕÓÚ½â¾öÁ˸ù¾Ý¹Ø¼ü×Ö»ñÈ¡ÑÕÉ«rgbÖµµÄÎÊÌâ¡£
˳±ã°Ñ³ÌÐòÒ²ÖØÐÂÕûÀíÒ»·¬£¬²¢Ê¹ÓÃÁË×î½üÕûÀíµÄ¹¤¾ß¿â¡£
Ч¹ûÔ¤ÀÀµ½ÕâÀï
ÏÂÔØÍêÕûʵÀý
³ÌÐò˵Ã÷
¡¾ColorGradsÑÕÉ«Ìݶȡ¿
³ÌÐòColorGradsµÄ×÷ÓÃÊǸù¾ÝÑÕÉ«¼¯ºÏºÍ½¥±ä¼¶ÊýÉú³ÉÑÕÉ«Ìݶȼ¯ºÏ¡£
½¥±ä¼ ......
JavascriptÖÐ×î³£ÓõÄ55¸ö¾µä¼¼ÇÉ ÊÕ²Ø
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 ......
ÔÎÄ£ºÁõÎä
| Javascript²Ù×÷ÏÂÀ¿òµÄ³£Ó÷½·¨
ÏîÄ¿ÖÐÅöµ½ÐèÒªÓÃjavascript²Ù×÷ÏÂÀ¿òµÄÇé¿ö£¬Ë³±ã×öÒ»ÏÂ×ܽᣬÁгöһЩ³£Ó÷½·¨£¬ÒÔÏ·½·¨¾ùÔÚFIRFOX3.5¼°IE8ÉϲâÊÔ¹ý£¬ÈçÓÐÆäËûä¯ÀÀÆ÷ÎÞ·¨Õý³£ÔËÐеÄÇëÓë±ÊÕßÁªÏµ¡£
//Ìí¼ÓÒ»¸öÏÂÀ¿ò
function AddDropDownList(id,fatherCtl)
{
if(!document.getElementById(id) ......
ÃüÃû¿Õ¼ä£¬Ò»¿´¾ÍÖªµÀÖ÷ҪĿµÄÊÇΪÁ˱ÜÃâ³åÍ»¡£ÏÂÃæ¾ÍÀ´ËµÒ»ÏÂÈçºÎ´òÔì×Ô¼ºµÄJavaScriptÃüÃû¿Õ¼ä¡£
´òÔìJavaScriptÃüÃû¿Õ¼äÆäʵºÜ¼òµ¥£¬Ö»ÐèÒª½«×Ô¼ºµÄº¯Êý¡¢¶ÔÏó¡¢±äÁ¿µÈ·ÅÔÚÒ»¸öαÃüÃû¿Õ¼äÖУ¬¼´ÓÃÒ»¸öÄäÃûº¯Êý°ü×°ÆðÀ´¡£
(function(){
function $(id){
&n ......