华恩JAVA班第54天
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>使用getAttribute读取节点的属性值</title>
<style type="text/css">
img{
body{
}
input{
}
</style>
<script type="text/javascript">
function hh(){
function check(){
function change(){
</script>
</head>
<body>
<img src="images/fruit.jpg"
<h1 id="love">选择你喜欢的水果:</h1>
<input name="enjoy" type="checkbox" value="apple" />苹果
<input name="enjoy" type="checkbox" value="banana" />香蕉
<input name="enjoy" type="checkbox" value="grape" />葡萄
<input name="enjoy" type="checkbox" value="pear" />梨
<input name="enjoy" type="checkbox" value="watermelon" />西瓜
<br />
<input name="btn" type="button" value="显示图片路径" οnclick="hh()" />
<br /><input name="btn" type="button" value="喜欢的水果" οnclick="check()" />
<br /><input name="btn" type="button" value="改变图片" οnclick="change()" />
</body>
</html>
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>根据层次关系查找节点</title>
<style type="text/css">
td{
table{
body{text-align:center;}
input{margin-top:5px;}
</style>
<script type="text/javascript">
function checks(){
</script>
</head>
<body><table border="0" cellspacing="0" cellpadding="0" id="myTable">
</table>
<input name="btn" type="button" value="第二行第一个单元格内容" οnclick="checks()" />
</body>
</html>
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>增加节点</title>
<script type="text/javascript">
function newNode(){
function copyNode(){
</script>
</head>
<body>
<h2>喜欢的水果</h2>
<input id="b1" type="button" value="增加一幅图片" οnclick="newNode()" />
<input id="b2" type="button" value="复制原图" οnclick="copyNode()" /><br />
<img src="images/sixty2.jpg" id="sixty2" alt="果篮" />
</body>
</html>
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>删除节点</title>
<script type="text/javascript">
function delNode(){
function repNode(){
</script>
</head>
<body>
<h2>喜欢的水果</h2>
<input id="b1" type="button" value="删除图片" οnclick="delNode()" />
<input id="b2" type="button" value="替换图片" οnclick="repNode()" /><br />
<img src="images/sixty2.jpg" id="sixty2" alt="果篮" />
</body>
</html>
更多信息可以参见同学富晓磊的博客:http://blog.sina.com.cn/u/1798827371