phpcms 留言版

 

<script language='javascript' src='{APP_PATH}index.php?m=formguide&c=index&a=show&formid=21&action=js&siteid=1'></script>

 

 <form method="post" action="{APP_PATH}index.php?m=formguide&c=index&a=show&formid=21&action=js&siteid=1"  name="myform" id="myform">
        <table width="725" border="0" cellspacing="0" cellpadding="0" style="margin-bottom:100px;">
          <tbody><tr>
            <td width="150" height="30" align="center">標  題:</td>
            <td width="562" height="30"><input type="text" name='info[title]' id="title" class="lyb_text"></td>
          </tr>
          <tr>
            <td width="150" height="30" align="center">姓  名:</td>
            <td height="30"><input type="text" name='info[name]' id="names" class="lyb_text"></td>
          </tr>
          <tr>
            <td width="150" height="30" align="center">聯繫方式:</td>
            <td height="30" style="font-size: 12px;"><input type="text" name='info[connect]' id="connect" class="lyb_text">
               (QQ,電話,坐機,可添寫任意一種方式)</td>
          </tr>
          <tr>
            <td width="150" align="center" valign="top" style="padding-top:15px;">留言內容:</td>
            <td height="330"><label for="textfield4"></label>
            <textarea name='info[content]' class="lyb_text2" id="content"></textarea></td>
          </tr>

          <tr>

      <input type="hidden" name='dosubmit' value='1'>
            <td height="30" align="center" valign="top" style="padding-top:15px;">&nbsp;</td>
            <td height="30" align="left"><button id="dosubmit"  class="dosubmit" name="dosubmit"><a href="javascript:void(0)" ><img src="/statics/china/images/lyb_btn.jpg"></a></button></td>
          </tr>
        </tbody></table>

      </form>
<script>

  $('#dosubmit').click(function(){
 
    $.ajax({
        type:'POST',
        url:"{APP_PATH}index.php?m=formguide&c=index&a=show&formid=12&action=js&siteid=1",
        data:$('form').serialize(),
        success:function(data){
            
            
        }
        // data:{'info[class]':zxzl,'info[name]':name,'info[email]':email,'info[number]':number,'info[ss]':ss,'info[content]':content,'dosubmit':1},
    });
            $('#dosubmit').attr('disabled',true);
            alert('留言提交成功!');
            setTimeout(function(){
                window.location.href="/";
            },3000);
  });
</script>

<input type="hidden" name='dosubmit' value='1'> 必須要加上去

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章