Board logo

標題: 留言版 [打印本頁]

作者: may    時間: 2011-5-21 18:57     標題: 留言版

<script>
  // 檢查 form 內的必要欄位是否已填寫
  // 或所填的資訊是否有誤
  function check() {
    var form = document.mailform;
        if(form.contacter.value == ""){
                alert("請輸入聯絡人的姓名。");
                return false;
        }
    else if(form.telphone.value == ""){
                alert("請輸入聯絡的電話。");
                return false;
    }
        else if(form.email.value == ""){
                alert("請輸入聯絡的電子郵件。");
                return false;
    }
    else // 上列檢查均通過才送出表單
      return true;
  }
</script>
<form name='mailform' method='post' action='process.php' onsubmit="return check();">
<table width="440" border="0" align="center" bgcolor="#EEEEEE" cellspacing="0" cellpadding="0" style="">
        <tr><td>公司名稱 : </td><td><input type='text' name='companyname' id='companyname' size=''></td></tr>
        <tr><td>聯絡人 : </td><td><input type='text' name='contacter' id='contacter' size=''></td></tr>
        <tr><td>地址 : </td><td><input type='text' name='address' id='address' size=''></td></tr>
        <tr><td>電話 : </td><td><input type='text' name='telphone' id='telphone' size=''></td></tr>
        <tr><td>電子郵件 : </td><td><input type='text' name='email' id='email' size=''></td></tr>
        <tr><td>問題與建議 : </td><td><textarea name='message' id='message' rows='4' cols='40'></textarea></td></tr>
        <tr><td><input type="reset" name="reset" value="清除重填"></td>
        <td><input type="submit" name="Submit" value="送出訊息"></td></tr>
</table>
</form>
作者: 大乖乖v    時間: 2011-8-9 18:06

很不错,值得鼓励,。。。













珍珠粉最好的珍珠粉品牌长生鸟珍珠粉珍珠粉价格




歡迎光臨 種子論壇 | 高雄市資訊培育協會學員討論區 (http://istak.org.tw/seed/) Powered by Discuz! 7.2