function checkTBox(){ var btn = document.getElementById("tbtn");var txt = document.getElementById("tbox");if(txt.value == "abcdefg"){ alert("谢谢您的参与");...
求一段简单的HTML代码
<body>
<input type="text" id="tbox"><input id="tbtn" type="button" value="提交" onClick="checkTBox()">
<script>
function checkTBox(){
var btn = document.getElementById("tbtn");
var txt = document.getElementById("tbox");
if(txt.value == "abcdefg"){
alert("谢谢您的参与");
}else{
alert("输入错误");
}
}
</script>
</body>2015-07-08
<html>
<head>
<title>我的第一个
HTML
页面</title>
</head>
<body>
<p>body
元素的内容会显示在浏览器中。</p>
<p>title
元素的内容会显示在浏览器的标题栏中。</p>
</body>
</html>2019-05-16
<!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" xml:lang="en" lang="en">
<head>
<title>test</title>
<style>
body,div,ul,li{
margin:0;
padding:0;
}
li{
float:left;
}
input{
display: block;
}
</style>
</head>
<body>
<div>
<ul>
<li>
<input type="checkbox" />
<input type="checkbox" />
<input type="checkbox" />
</li>
<li>
<input type="checkbox" />
<input type="checkbox" />
<input type="checkbox" />
</li>
</ul>
</div>
</body>
</html>2015-07-08