<form   ... onSubmit="return check(this)">这样在提交的时候,网页就会自动去调用check()方法。如果该方法返回true,则继续让表单提交;否则不提交。check()方法楼主自己实现。

解决方案 »

  1.   

    先谢上面这位,,
    我就是这句不会写:
    if confirm("您輸入的資訊:\n"+this.card.value+"\n"+this.crMan.value+"\n"+this.shop.value+"\n"+this.cardnum.value+"\n"+this.memo.value+"\n請確認資訊的正確性!"){
    this.submit();
    return true;
    }else{
    return false;
    }
    confirm("您輸入的資訊:\n"+this.card.value+"\n"+this.crMan.value+"\n"+this.shop.value+"\n"+this.cardnum.value+"\n"+this.memo.value+"\n請確認資訊的正確性!"){     <<<<<<这句不会写
      

  2.   

    if(confirm("XXXXX"))//外围有一个括号
    {
    }
    else
    {
    }