HTML初学者疑问

来源:百度知道 编辑:UC知道 时间:2024/06/21 04:29:33
<html>
<head>
<style>
h1 {font-size : 12px; color : #FF0000}
</style>
<script language="javascript">
function abc()
{
var s1=form1.boy.value;
if(s1=="")
window.alert("嘿嘿!你输错了。");
else
window.alert("d")
}

</script>
<title>sd</title>
</head>
<body>

<form name="form1" method="post" action="">
<h1>dsdasdasjldal;skdpasjduiasdoas</h1>
<img src="87ab.jpg" width="480" height="640" id="img1">

<label>
<input type="text" name="boy" onClick="abc()">
</label>
</form>

</body>
</html>
这是自己练习的一小段程序 刚学没几天
运气好啊 调试还算成功 可是
if(s1=="")
window.alert("嘿嘿!你输

method="post"
这是传输方式 有两种get和post
get 安全性低``
一般用post
action=""
Action=”” 是用来提交参数的值
Action=”” 为空时,指直接用本页来处理
指你提交表单后要跳转的页面!
PS:action="index.asp"
提交后跳转到index.asp页面

confime写错了而是confirm
opener是打开子窗口,要输入必要的参数的。