<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>

解决方案 »

  1.   

    如果在本页面的话用alert就可以了,方法见上面的,如果提交到别的页面,直接输出各种元素的name的值所代表的变量的值就可以了.
      

  2.   

    if(!confirm("是否要提交数据呢?"))
    {
    //如果选择了否就中断你的操作,并返回
    return false;
    }//如果选择了是就继续你的操作
      

  3.   

    52juanjuan(Fibona) ( ) 信誉:100 
    你好,谢谢你我就是想做你的这种,但是我这样做if(!confirm("是否要提交数据呢? document.form1.textfield.value"))
    {
    //如果选择了否就中断你的操作,并返回
    return false;
    }显示出来的是“是否要提交数据呢? document.form1.textfield.value”
    没有数据,不知道该怎么修改
      

  4.   

    设置变量把是否要提交跟document.form1.textfield.value加一下
      

  5.   

    ("是否要提交数据呢? "+document.form1.textfield.value)
      

  6.   

    我想在弹出的confirm中如下显示,该怎么写?是否要提交数据呢?
    选项一:document.form1.textfield.value
    选项二:document.form1.textfield2.value
    选项三:document.form1.textfield3.value
    选项四:document.form1.textfield4.value
    选项五:document.form1.textfield5.value