[ת]aspµÄtextboxµÄjavascriptÓ¦ÓÃ
<%@ Page Language="C#" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server"> </script>
<html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server">
<title>ÎÞ±êÌâÒ³</title>
<script language="javascript" type="text/javascript">
//javascriptÉèÖÃÎı¾¿òµÄ×î´ó³¤¶È
function Button1_Click()
{
var txtBox1=document.getElementById("TextBox1");
txtBox1.maxLength=10;
return false;
}
//javascriptÉèÖÃÎı¾¿òµÄÊôÐÔΪֻ¶Á
function Button2_Click() {
var txtBox1=document.getElementById("TextBox1");
txtBox1.readOnly=true;
return false;
}
//javascriptÉèÖÃÐÐÊýÓëÎı¾¿òÀàÐÍ //½«<input type=text />¸Ä³É£¼textarea /> //idºÅ²»±ä
function Button3_Click()
{
//ÒÆ³ýTextBox1
var textBox1=document.getElementById("TextBox1");
var textBox1id=textBox1.id; //µÃµ½TextBox1µÄ¸¸ÔªËØ
var parentE=textBox1.parentElement; parentE.removeChild(textBox1);
//´´½¨ÐÂÔªËØ
TextArea var newTextBox1=document.createElement("<textarea />");
newTextBox1.id=textBox1id;
newTextBox1.name=textBox1id;
newTextBox1.rows=10;
parentE.appendChild(newTextBox1);
// parentE.insertBefore(newTextBox1,textBox1);
return false;
}
//javascriptÉèÖÃÎı¾¿òµÄÎı¾
function Button4_Click()
{
var txtBox1=document.getElementById("TextBox1");
txtBox1.value='Öйú¡£ºÓ±±¡£±£¶¨¡£ÇúÑô¡£Íõ°®»Ô';
return false;
}
//javascriptÉèÖÃÊó±êÒÆ¹ýÈ¥ÏÔʾÎı¾
function Button5_Click()
{
var txtBox1=document.getElementById("TextBox1");
txtBox1.title='ÇúÑôÏØµÚÒ»ÖÐѧ';
return false;
}
//ÉèÖÃÎı¾¿òµÄ¿É¼ûÐÔ //¿ÉÄÜÊǽ«TextBox1¿Ø¼þ´ÓdomÊ÷ÖÐɾ³ý
function Button7_Click()
{
var txtBox1=document.getElementById("TextBox1");
return false;
}
//javascriptÉèÖÃÊÇ·ñ×Ô¶¯»»ÐÐ //Ö»¶Ô<textare />ÓÐЧ
function Button6_Click()
{ return false; }
</script>
</head>
<body>
<form id="form1" runat
Ïà¹ØÎĵµ£º
±¾ÎÄÖ÷ÒªÊdzöÓÚÓÐÅóÓÑʹÓÃÎÒÔÀ´Ð´µÄautocompleteµÄJS¿Ø¼þ¡£µ±Êý¾ÝÁ¿´óµÄʱºò£¬»á³öÏÖЧÂʼ«ÆäÂýµÄÇé¿ö£¬ÎÒÔÚÕâ¶Îʱ¼ä×ö³öµÄһЩ²âÊÔÒ²¼°Ò»Ð©¾Ñ飬Óë´ó¼Ò·ÖÏí£¬Èç¹ûÓдíµÄµØ·½£¬»¹ÇëÖ¸³ö¡£
¾¹ý²âÊÔ£¬ÎÒÃǻᷢÏÖÈçϵÄÇé¿ö»òÕß˵µÄ½áÂÛ£¬Èç¹ûÄúµÄ²âÊÔ½á¹ûÓëÎҵIJ»·û£¬Çë˵Ã÷ÔÒò£¬ÒÔ±ãÏ໥ѧϰ¡£
1£©µ±Ò»¸ö½Ï´óµÄHTML×Ö· ......
Ñо¿Á˰ëÌì,²»¹ýÃ²ËÆ»¹ÊÇÖ»ÄÜÔÚIEÉÏʵÏÖ,ÆäËûä¯ÀÀÆ÷²»Ö§³ÖEMBED ±êÇ©
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>ÓÃjavascriptÖÆ×÷³¬Á´½ÓµÄ±³¾°ÒôЧ</title>
<script language="JavaScript" type="text/JavaScript">
<!--
......
¸¸´°¿ÚÖÐÓÐÈýÖÖ·½Ê½´ò¿ª×Ó´°¿Ú£º
1£º
window.open(URL,windowName,parameters);
2:
alert(""); //µ¯³öÐÅÏ¢Ìáʾ¶Ô»°¿ò
confirm(""); //µ¯³öÐÅϢȷÈ϶Ի°¿ò
prompt(""); //¾ßÓн»»¥ÐÔÖʵĶԻ°¿ò
3:
//´´½¨Ä£Ì¬Äã¶Ô»°¿ò
window.showModalDialog(sURL,vArguments,sFeatures)
//´´½¨·Çģ̬¶Ô»°¿ò
window.showM ......
<!--
/* Font Definitions */
@font-face
{font-family:ËÎÌå;
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-alt:SimSun;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
@font-face
{font-family:"\@ËÎÌå" ......
ÉÏ´Î˵µ½ÎÒÃÇÔÚÎÞ¾ú»·¾³ÖÐÉè¼ÆÁËÒ»¸öʼþ´úÀíº¯Êý£¬µ«ÐÔÄÜÊǸöÎÊÌ⣬½â¾öËüÎÒÃÇÐèÒª»º´æ½Úµã¼¯ºÏ£¬·¢Ïֽڵ㼯ºÏ²»×ãÒÔÓ¦¶ÔÐÂÇé¿öʱ£¬ÔÙÌæ»»Õâ¸ö½Úµã¼¯ºÏ£¬ÖØÐ¿ªÊ¼Æ¥Åä¡£ÏÂÃæÊÇÐµķ½°¸£º
var delegate = function(selector,type,callback){
var els = $(selector);
addEvent(document,t ......