Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

JavaScript_¶¯Ì¬Ôö¼Ó/ɾ³ýÊäÈë¿ò

±¾ÎÄÖ÷Òª½éÉÜÈçºÎ¶¯Ì¬µÄÔö¼Ó¡¢É¾³ýÊäÈë¿ò£¬²¢»ñÈ¡ÊäÈë¿òÖеÄÖµ~~
<html>
<head>
<title>JavaScript_¶¯Ì¬Ôö¼Ó/ɾ³ýÊäÈë¿ò_°¢·½Ë÷</title>
<script type="text/javascript">
<!--
var idNumber = 1,id="tableAFS";
function addTextBox() {
idNumber++;
//ÕâÀïÎÒÃÇ´´½¨Ò»¸ölabel¿Ø¼þ
label0 = document.createElement("label");
label0.setAttribute("id","label"+idNumber);
//´´½¨ÊäÈë¿ò
var textField = document.createElement("input");
textField.setAttribute("type","text");
textField.setAttribute("name","Title");
textField.setAttribute("id","Title"+idNumber);
label0.appendChild(textField);
//´´½¨°´Å¥
var textField2 = document.createElement("input");
textField2.setAttribute("type","button");
textField2.setAttribute("name","button");
textField2.setAttribute("value","ɾ³ý¸ÃÐÐ");
textField2.onclick=function(){removeTextBox(this)}
label0.appendChild(textField2);

document.getElementById(id).appendChild(label0);
}
function removeTextBox(o) {
var t=document.getElementById(id).getElementsByTagName("label").length;
if ( t> 1) //Èç¹û³¬¹ý1¸ötextbox
document.getElementById(id).removeChild(o.parentNode);
}
function show()
{
var t=document.getElementById(id).getElementsByTagName("label").length;
var allText = document.getElementById(id).getElementsByTagName("input");
var s = "";
for(i=0;i<allText.length;i++)
{
if(allText[i].id.indexOf('Title')=="0"){
s = s+allText[i].value + "\n" ;
}
}
alert(s);
}
//-->
</script>
<style type="text/css">
<!--
label {
display:block;
margin:.25em 0em;
}
-->
</style>
</head>
<body>
<form id="table11">
<table width="550" border="0" align="center" cellpadding="0" cellspacing="1" >
<tr>
<td height="25" bgcolor="#FFFFFF">
<div id="tableAFS"><label>
<input type="text" name="Title" id="Title" />
<input name="button" type="butt


Ïà¹ØÎĵµ£º

JavaScriptÕýÔò±í´ïʽ

//УÑéÊÇ·ñÈ«ÓÉÊý×Ö×é³É 
function isDigit(s) 

var patrn=/^[0-9]{1,20}$/; 
if (!patrn.exec(s)) return false 
return true 

//УÑéµÇ¼Ãû£ºÖ»ÄÜÊäÈë5-20¸öÒÔ×Öĸ¿ªÍ·¡¢¿É´øÊý×Ö¡¢“_”¡¢“.”µÄ×Ö´® 
function isRegisterUserName(s)
{
v ......

javascript °ü¹ü½Úµã

Ä£·ÂjQuey£¬´´½¨¼¸¸ö°ü¹ü½ÚµãµÄ·½·¨£¬·¢ÏÖjQueryµÄ·½·¨ºÜµÍЧ°¡£¬ÏÂÒ»´ÎËûÓÖ¿ÉÒÔ˵Õ⼸¸ö·½·¨¿ÉÒÔÌáÉýÁ˶àÉÙ¶àÉÙÁË¡£Ô­Àí»ù±¾ÊÇÕâÑù£¬Èç¹û´«ÈëµÄÊÇ×Ö·û´®£¬ÄÇôÈÃËüÃDZä³ÉÒ»¸öÔªËؽڵ㣬²»¹ýÕâÔªËؽڵãÒ²¿ÉÒÔÓÐÐí¶à²ã£¬ÔÚ×îÄÚ²ã°ÑÒª°ü¹üµÄÔªËطŽø¡£°Ñ×Ö·û´®±ä³ÉÔªËؽڵãµÄ·½·¨ÓÐÈçϼ¸¸ö¡£1£¬createElement£¬IE¿ÉÒÔÁ¬ÔªËØÊ ......

javascriptÌí¼ÓнڵãµÄ·½·¨

//´´½¨Ò»¸öеÄÔªËؽڵ㣬ԪËØÃûʹÓÃsTagName¶¨Òå
oElementNode = document.createElementNode(sTagName);
//´´½¨Ò»¸öеĽڵ㣬½ÚµãÃûʹÓÃsTextValue¶¨Òå
oTextNode = document.createTextNode(sTextValue);
//ΪԪËظ³Ò»¸öеÄÊôÐÔ£¬ÊôÐÔÃûʹÓÃsName
oAttribute = document.createAttribute(sName);
//´´½¨Ò»¸öÐ嵀 ......

ÓÃJavascript¶¯Ì¬Ìí¼Óɾ³ýHTMLÔªËØʵÀý

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>ÓÃjavascript¶¯Ì¬Ìí¼Óɾ³ýhtmlÔªËØ</title>
<script type="text/javascript"><!-- 
function $(nodeId) { 
re ......

ÓÃJavascriptÁ¬½ÓAccessÊý¾Ý¿âµÄ·½·¨

±¾ÎĽéÉÜjavascriptÁ¬½ÓaccessÊý¾Ý¿âµÄ·½·¨¡£Õâ¶Î´úÂëÔÚ±¾µØ¿ÉÒÔÕý³£ÔËÐУ¬ÔÚÏßÔòÐèÒª×ã¹»µÄȨÏÞ¡£ÓÉÓÚ²ÉÓÃAccessÊý¾Ý¿â£¬ËùÒÔ²¢²»Ê¹Óñê×¼µÄSQLÓ﷨ʹÓÃʱ¡£ÐèҪעÒâ¡£
Õ⼸Ìì·ÑÁËͦ´óÁ¦ÆøÔÚÍøÉϲéÕÒjavascriptÁ¬½ÓaccessÊý¾Ý¿âµÄ·½·¨£¬¾­¹ýÕûÀí×ܽᣬÖÕÓÚд³öÒ»¶ÎÄܹ»ÓÐЧִÐеĴúÂë¡£
µ«ÊÇÕâ¶Î´úÂëÔÚ±¾µØ¿ÉÒÔÕý³£ÔËÐУ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ