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

HTMLµÄDOM²Ù×÷Àý×Ó

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>use html as DOM</title>
<mce:script language="javascript" type="text/javascript"><!--
function addUser() {
// get and execute name
var name = $("name").value;
if(name == "") return;

// create a new row
var row = document.createElement("tr");
row.setAttribute("id", name);

// create a new cell (name)
var cell = document.createElement("td");
cell.appendChild(document.createTextNode(name));

// add cell to row
row.appendChild(cell);

// a new cell (delete)
cell = document.createElement("td");

// dim a button
var delButton = document.createElement("input");
delButton.setAttribute("type", "button");
delButton.setAttribute("value", "delete");
delButton.onclick = function () {delUser(name)};

// add button to cell
cell.appendChild(delButton);

// add cell to row
row.appendChild(cell);

// add row to table
$("userList").appendChild(row);

// set textbox ""
$("name").value = "";
}

function delUser(name) {
$("userList").removeChild($(name));
}

function $(id) {
return document.getElementById(id);
}

// --></mce:script>
</head>
<body>
<input type="text" id="name">
<input type="button" value="add" onclick="addUser()"><p/>
<table border="1">
<thead>
<td width="100">name</td><td>delete</td>
</thead>
<tbody id="userList">
</tbody>
</ta


Ïà¹ØÎĵµ£º

Javascript ÖжÔHTML±àÂëºÍ½âÂëµÄ·½·¨

String.prototype.HTMLEncode = function() {
var temp = document.createElement ("div");
(temp.textContent != null) ? (temp.textContent = this) : (temp.innerText = this);
var output = temp.innerHTML;
temp = null;
return output;
}
String.prototype.HTMLDecode = function() {
var temp = doc ......

Ãæ¶ÔHTML¿Ø¼þÎÒÔÙÒ»´Î´óÒâÁË

µ±HTML¿Ø¼þµÄid="ctl00_contentPlaceHolder_ddl_academy",name="ctl00$contentPlaceHolder$ddl_academy"ʱ
Request.Form["ctl00$contentPlaceHolder$ddl_academy"]¶ø²»ÊÇ
Request.Form["ctl00_contentPlaceHolder_ddl_academy"] ......

aspÏÂÔØÆäËüÍøÕ¾µÄͼƬÀ´¸øhtmlÏÔʾ

<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
Option Explicit
Response.Buffer = True '»º´æÍ¼Æ¬
Dim objXMLHTTP, XML
Set XML = Server.CreateObject("Microsoft.XMLHTTP") '½¨Á¢ÏÂÔØ¶ÔÏó
XML.Open "GET","http://www.google.cn/images/nav_logo7.png",False '¿ªÊ¼»ñȡͼƬ,http://xxx/pngÕâ½Ú¿ÉÒԸijÉ× ......

ÔÚHTMLÓïÑÔÖеÄMeta(ת×ÔÍøÂç)

metaÊÇÓÃÀ´ÔÚHTMLÎĵµÖÐÄ£ÄâHTTPЭÒéµÄÏìӦͷ±¨ÎÄ¡£meta ±êÇ©ÓÃÓÚÍøÒ³µÄ<he
ad>Óë</head>ÖУ¬meta ±êÇ©µÄÓô¦ºÜ¶à¡£meta µÄÊôÐÔÓÐÁ½ÖÖ£ºnameºÍhttp-equiv
¡£nameÊôÐÔÖ÷ÒªÓÃÓÚÃèÊöÍøÒ³£¬¶ÔÓ¦ÓÚcontent£¨ÍøÒ³ÄÚÈÝ£©£¬ÒÔ±ãÓÚËÑË÷ÒýÇæ»úÆ÷
È˲éÕÒ¡¢·ÖÀࣨĿǰ¼¸ºõËùÓеÄËÑË÷ÒýÇæ¶¼Ê¹ÓÃÍøÉÏ»úÆ÷ÈË×Ô¶¯²éÕÒmetaÖµÀ ......

HTMLÄÚ²¿ÔªËصÄMouseʼþ¸ÉÈÅ

½â¾öHTMLÄÚ²¿ÔªËصÄMouseʼþ¸ÉÈÅ
½â¾öHTMLÄÚ²¿ÔªËصÄMouseʼþ¸ÉÈÅ
»°ËµÓÐÒ»¸öDIVÔªËØ£¬ÆäÄÚ²¿ÓÐÒ»¸öIMGÔªËØºÍSPANÔªËØ£¬²»ÓÃÀí»áÕâÁ½¸öÄÚ²¿ÔªËØÔõô²¼¾Ö£¬Õâ²»ÊÇÎÒÒªÌÖÂÛµÄÖØµã¡£
ΪÁËʵÏÖÒ»Ð©ÌØÊâµÄЧ¹û£¬ÎÒÐèÒªÀûÓÃTDµÄonmouseoverºÍonmouseoutʼþ£¬²âÊÔʱ¾Í»á·¢ÏÖÈçϵÄ×´¿ö£º
µ±Êó±êÒÆÈëDIVÄÚ²¿Ê±£¬onmouseov ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ