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
Ïà¹ØÎĵµ£º
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta http-equiv="Content-Lan ......
Êó±êµÄ¶àÖÖÑùʽ...
<P><a href="help.htm" style="cursor:hand">ÊÖ</a>
<a href="help.htm" style="cursor:text">Îı¾</a>
<a href="help.htm" style="cursor:MOVE">Ëĸö·½ÏòµÄ¼ýÍ·</a>
<a href="help.htm" st ......
<html>
<frameset cols="25%,50%,25%">
<frame src="/example/html/frame_a.html">
<frame src="/example/html/frame_b.html">
<frame src="/example/html/frame_c.html">
<noframes>
<!-- ÔÚä¯ÀÀÆ÷²»Ö§³ÖÊ ......
<html>
<frameset cols="50%,*,25%">
<!-- ×ó±ßÒ³ÃæÕ¼50% ±»¹Ì¶¨×¡ÁË -->
<frame src="/example/html/frame_a.html" noresize="noresize"
/>
<frame src="/example/html/frame_b.html" />
<frame s ......
HTML Parser is a Java library used to parse HTML in either a linear or nested fashion. Primarily used for transformation or extraction, it features filters, visitors, custom tags and easy to use JavaBeans. It is a fast, robust and well tested package.
code download£ºhttp://sourceforge.net/pr ......