<!DOCTYPE html>
<html>
<head>
<title>my first html Webpage</title>
</head>
<body>
<p>
this is a test!
</p>
<form action="form_action.asp" method="get">
<p>发信人:<input type="text" id="mName" /></p>
<p>发新内容:<input type="text" id="mContent" /></p>
<label for="male">Male</label>
<input type="radio" name="sex" id="male" />
<label for="female">Female</label>
<input type="radio" name="sex" id="female" />
<button type="button" οnclick="display()">
发送
</button>
</body>
</html>
<script type="text/javascript" >
function display(){
alert(" message send success!");
}
<html>
<head>
<title>my first html Webpage</title>
</head>
<body>
<p>
this is a test!
</p>
<form action="form_action.asp" method="get">
<p>发信人:<input type="text" id="mName" /></p>
<p>发新内容:<input type="text" id="mContent" /></p>
<label for="male">Male</label>
<input type="radio" name="sex" id="male" />
<label for="female">Female</label>
<input type="radio" name="sex" id="female" />
<button type="button" οnclick="display()">
发送
</button>
</body>
</html>
<script type="text/javascript" >
function display(){
alert(" message send success!");
}
</script>
<!--<script type="text/javascript">
document.write("<h1>This is a heading</h1>");
document.write("<p>This is a paragraph</p>");
+'/n' "发新内容:"+'document.getElementById("mContent").value'
</script>
<script type="text/javascript" >
function display(){
alert(" 发件人:"+ 'document.getElementById("mName").value');
}-->
<p>是块级元素,定义段落。
<input> 标签用于搜集用户信息。
<label> 标签为 input 元素定义标注。