日期:2014-05-17 浏览次数:20700 次
<a id="a" name="a">abcdefg</a>
<%
String data = request.getParameter("a");
out.println("获取a标签的内容:"+data);
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title> New Document </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
</head>
<body>
<a id="asdf" name="a">abcdefg</a>
</body>
<script>
var ad = document.getElementById("asdf").innerHTML;
alert(ad);
</script>
</html>