ppypp伦理天堂,91手机在线视频,免费在线观看黄色毛片,夜夜穞天天穞狠狠穞AV美女按摩

聯系官方銷售客服

1835022288

028-61286886

投訴 已解決 我使用ajax提交表單都時候提示模版不存在是什么情況 11 0
POSCMS版本:

我使用ajax提交表單都時候提示模版不存在是什么情況,返回個這玩意,


image.png


image.png

解決方案
  • 要知道在什么頁面提交?最好貼上代碼

  • 首頁提交

    【undefined】1樓

  • 首頁提交需要檢查<form> 是怎么寫的,你把index.html復制上來看看

  • <script src="{HOME_THEME_PATH}lay/layer.js" charset="utf-8"></script>

    <style media="screen">

    .myformclass{

    width: 400px !important;

    /* height: 420px */

    min-height: 200px

    }

    .myform{

    background: #fff;

    padding: 30px

    }

    .formtitle{

    font-size: 20px;

    text-align: center;

    padding-bottom: 15px

    }

    .hui-item{

    display: flex;

    flex-direction: row;

    align-items: center;

    padding: 10px 5px;

    border-bottom: 1px solid #eee;

    }

    .formb{

    display: flex;

    flex-direction: row;

    justify-content: flex-end;

    padding: 10px 0

    }

    .formbutton{

    background: #fc7b26;

    color: #fff;

    border: none;

    border-radius: 2px;

    padding: 8px 20px;

    cursor: pointer;

    }

    .hui-item span{

    width: 60px;

    font-size: 12px;

    color: #666

    }

    .hui-item input{

    border: none;

    flex: 1

    }

    .layui-layer-title{

    background: #fc7b26;

    color: #fff

    }

    </style>

    <div class="myform" id="myform"><form method="post"><div class="hui-item"><span>姓名</span><input type="text" name="data[title]" value="" placeholder="您的姓名"></div><div class="hui-item"><span>電話</span><input type="text" name="data[dianhua]" value="" placeholder="您的手機號碼"></div><div class="hui-item"><span>數量</span><input type="text" name="data[shuliang]" value="" placeholder="您要購買的郵箱個數"></div></form><div class="formb"><button type="button" class="formbutton" name="button" onclick="dr_submit()">提交</button></div></div>

    <script type="text/javascript">

    function dr_layer(){

    var html='<div class="myform" id="myform"><form method="post"><div class="hui-item"><span>姓名</span><input type="text" name="data[title]" value="" placeholder="您的姓名"></div><div class="hui-item"><span>電話</span><input type="text" name="data[dianhua]" value="" placeholder="您的手機號碼"></div><div class="hui-item"><span>數量</span><input type="text" name="data[shuliang]" value="" placeholder="您要購買的郵箱個數"></div></form><div class="formb"><button type="button" class="formbutton" name="button" onclick="">提交</button></div></div>';

    layer.open({

    type: 1,

    title: '在線預定',

    closeBtn: 1,

    shadeClose: true,

    skin: 'myformclass',

    content: html

    });

    }

    function dr_submit(){

    $.ajax({

    type: "POST",

    dataType:"json",

    url: '/index.php?c=form_cpyd',

    data: $('#myform').serialize(),

    success: function(json) {

    alert(json.code);

    }

    });

    //

    // layer.closeAll();

    // lay('預定成功,稍后我們會盡快與您聯系!');

    }

    function lay(msg){

    layer.msg(msg);

    }

    </script>

    【稻草人】3樓

  • <script src="{HOME_THEME_PATH}lay/layer.js" charset="utf-8"></script>

    <style media="screen">

    .myformclass{

    width: 400px !important;

    /* height: 420px */

    min-height: 200px

    }

    .myform{

    background: #fff;

    padding: 30px

    }

    .formtitle{

    font-size: 20px;

    text-align: center;

    padding-bottom: 15px

    }

    .hui-item{

    display: flex;

    flex-direction: row;

    align-items: center;

    padding: 10px 5px;

    border-bottom: 1px solid #eee;

    }

    .formb{

    display: flex;

    flex-direction: row;

    justify-content: flex-end;

    padding: 10px 0

    }

    .formbutton{

    background: #fc7b26;

    color: #fff;

    border: none;

    border-radius: 2px;

    padding: 8px 20px;

    cursor: pointer;

    }

    .hui-item span{

    width: 60px;

    font-size: 12px;

    color: #666

    }

    .hui-item input{

    border: none;

    flex: 1

    }

    .layui-layer-title{

    background: #fc7b26;

    color: #fff

    }

    </style>

    <div class="myform" id="myform"><form method="post"><div class="hui-item"><span>姓名</span><input type="text" name="data[title]" value="" placeholder="您的姓名"></div><div class="hui-item"><span>電話</span><input type="text" name="data[dianhua]" value="" placeholder="您的手機號碼"></div><div class="hui-item"><span>數量</span><input type="text" name="data[shuliang]" value="" placeholder="您要購買的郵箱個數"></div></form><div class="formb"><button type="button" class="formbutton" name="button" onclick="dr_submit()">提交</button></div></div>

    <script type="text/javascript">

    function dr_submit(){

    $.ajax({

    type: "POST",

    dataType:"json",

    url: '/index.php?c=form_cpyd',

    data: $('#myform').serialize(),

    success: function(json) {

    alert(json.code);

    }

    });

    //

    // layer.closeAll();

    // lay('預定成功,稍后我們會盡快與您聯系!');

    }

    function lay(msg){

    layer.msg(msg);

    }

    </script>

    【稻草人】3樓

  • 2018-04-23 11:09:34
    8分鐘42秒 0
    這代碼眼花繚亂!
  • ????

    【功能插件開發】6樓

  • 這個對的,樓主是少了form代碼

    【功能插件開發】6樓

  • 我錯了,,現在可以了,,,我把id給放錯地方了,,,欲哭無淚!!!!!

    【功能插件開發】6樓

  • 感謝大家給我解決此問題,我已經完美的解決