Discuz ajaxpost 提交表单 使用日志
- function ajaxpost(formid, showid, waitid, showidclass, submitbtn, recall)
- function ajaxpost(formid, 'return_handlekey')
提交后 验证表单
- submitcheck('submitbtn')
- <input type="hidden" name="formhash" value="{FORMHASH}" />
- <input type="hidden" name="submitbtn" value="true" />
- <input type="hidden" name="handlekey" value="handlekey" />
信息显示位置
- <span style="display: none" id="return_handlekey']"></span>
style="display: none"依照实际应用设置
然后表单必要进行数据验证,如果出错 输出提示信息方式:
- showmessage('submitcheck_error', '', array(), array('showdialog' => 1, 'showmsg' => true, 'closetime' => true));
- include template('common/header_ajax');
- echo $showstr;
- include template('common/footer_ajax');
- dexit();
- include template('common/header');
- include template('index/ajax_imagelist');
- include template('common/footer');
- dexit();
- <!--{template common/header_ajax}-->
- 要显示的内容
- <!--{template common/footer_ajax}-->
扫描二维码,手机查看
声明:本文来源于互联网,观点仅代表作者本人,不代表欢乐你我,真实性请妥善甄别。