你好,我想在點(diǎn)擊"保存文章"按鈕后,自動(dòng)跳轉(zhuǎn)到修改這個(gè)文章的頁面。這需要在方法中傳值,但我傳值后沒有生效,想知道什么原因
發(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>點(diǎn)擊按鈕后跳轉(zhuǎn)的地址:http://localhost:98/index.php?s=member&app=xiezuowenzhang&c=word_review2&m=edit&id={id}
因?yàn)榘粹o的第四個(gè)參數(shù)是不能獲取到ID的,你只能通過控制器來返回URL參數(shù)來實(shí)現(xiàn)跳轉(zhuǎn),App/xiezuowenzhang/controllers/member/home。php
里面通過json返回一個(gè)URL
開源是一種精神,但不是義務(wù),幫忙是情分,不幫也不要抱怨,建議大家多研究代碼、多閱讀代碼、多翻閱社區(qū)歷史問題!
回復(fù)@迅??蚣苈?lián)合創(chuàng)始人
非常感謝這么迅速的回復(fù),我去試試
$this->_json(1, '操作成功', ['url' => '跳轉(zhuǎn)url']);