innerHTML的用法
发布网友
发布时间:2022-04-29 19:40
我来回答
共2个回答
热心网友
时间:2022-04-19 09:45
innerHtml的用法
<Script Runat="Server">
Sub Button_Click( s As Object, e As EventArgs )
entries.innerHtml = "<hr>" & username.Value & "<p>" & comments.Value &
entries.innerHTML
End Sub
</Script>
<html>
<head><title>Guestbook.aspx</title></head>
<body>
<form Runat="Server">
<b>Username:</b>
<br><input id="username" type="text" size="30" Runat="Server">
<p>
<b>Comments:</b>
<br><textarea id="comments" cols=60 rows=10 Runat="Server"></textarea>
<p>
<input type="submit" value="Add Comment"
OnServerClick="Button_Click" Runat="Server">
<span id="entries" Runat="Server" />
</form>
</body>
</html>
热心网友
时间:2022-04-19 11:03
首先,不好怎么说,因为网页控件不一样,有些用法也就不一样
一般:document.控件name.innerHTML("内容")