87,921
社区成员
发帖
与我相关
我的任务
分享
<html>
<head>
<title>test</title>
<script type="text/javascript">
$(function(){
alert($("#area1").text());
})
</script>
</head>
<body>
<textarea id="area1">
hello
</textarea>
</body>
</html>
<html>
<head>
<title>test</title>
<script type="text/javascript">
function getAreaValue(){
alert(document.getElementById("area1").innerHTML);
}
window.onload = getAreaValue;
</script>
</head>
<body>
<textarea id="area1">
hello
</textarea>
</body>
</html>