<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<script>
<!--
function killerj(){
killerj="选项一:"
killerj=killerj+document.form1.textfield.value
killerj=killerj+" 选项二"
killerj=killerj+document.form1.textfield2.value
killerj=killerj+" 选项三"
killerj=killerj+document.form1.textfield3.value
killerj=killerj+" 选项四"
killerj=killerj+document.form1.textfield4.value
killerj=killerj+" 选项五"
killerj=killerj+document.form1.textfield5.valuealert(killerj)
}
-->
</script>
</head>
<body>
<form name="form1" method="post" action="">
选项1:
<input type="text" name="textfield">
选项2:
<input type="text" name="textfield2">
选项3:
<input type="text" name="textfield3">
选项4:
<input type="text" name="textfield4">
选项5:
<input type="text" name="textfield5">
<input type="button" name="Submit" onclick="killerj()">
</form>
</body>
</html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<script>
<!--
function killerj(){
killerj="选项一:"
killerj=killerj+document.form1.textfield.value
killerj=killerj+" 选项二"
killerj=killerj+document.form1.textfield2.value
killerj=killerj+" 选项三"
killerj=killerj+document.form1.textfield3.value
killerj=killerj+" 选项四"
killerj=killerj+document.form1.textfield4.value
killerj=killerj+" 选项五"
killerj=killerj+document.form1.textfield5.valuealert(killerj)
}
-->
</script>
</head>
<body>
<form name="form1" method="post" action="">
选项1:
<input type="text" name="textfield">
选项2:
<input type="text" name="textfield2">
选项3:
<input type="text" name="textfield3">
选项4:
<input type="text" name="textfield4">
选项5:
<input type="text" name="textfield5">
<input type="button" name="Submit" onclick="killerj()">
</form>
</body>
</html>
{
//如果选择了否就中断你的操作,并返回
return false;
}//如果选择了是就继续你的操作
你好,谢谢你我就是想做你的这种,但是我这样做if(!confirm("是否要提交数据呢? document.form1.textfield.value"))
{
//如果选择了否就中断你的操作,并返回
return false;
}显示出来的是“是否要提交数据呢? document.form1.textfield.value”
没有数据,不知道该怎么修改
选项一:document.form1.textfield.value
选项二:document.form1.textfield2.value
选项三:document.form1.textfield3.value
选项四:document.form1.textfield4.value
选项五:document.form1.textfield5.value