聯(lián)系官方銷售客服
1835022288
028-61286886
你好,我想在點擊"保存文章"按鈕后,自動跳轉(zhuǎn)到修改這個文章的頁面。這需要在方法中傳值,但我傳值后沒有生效,想知道什么原因
發(fā)布文章頁面地址:http://localhost:98/index.php?s=member&app=xiezuowenzhang&c=home&m=add
發(fā)布文章頁面按鈕:
<button type="button" onclick="$('#dr_is_draft').val(0);dr_ajax_submit('http://localhost:98/index.php?s=member&app=xiezuowenzhang&c=home&m=add', 'myAddForm', '2000','{SITE_URL}index.php?s=member&app=xiezuowenzhang&c=word_review2&m=edit&id={id}')" class="btn btn-primary mt-4">結(jié)束寫作</button>
點擊按鈕后跳轉(zhuǎn)的地址:http://localhost:98/index.php?s=member&app=xiezuowenzhang&c=word_review2&m=edit&id={id}
因為按鈕的第四個參數(shù)是不能獲取到ID的,你只能通過控制器來返回URL參數(shù)來實現(xiàn)跳轉(zhuǎn),App/xiezuowenzhang/controllers/member/home。php
里面通過json返回一個URL
回復(fù)@迅??蚣苈?lián)合創(chuàng)始人
非常感謝這么迅速的回復(fù),我去試試
$this->_json(1, '操作成功', ['url' => '跳轉(zhuǎn)url']);