我有一個模式與表單,並在我提交表單後,我得到一個成功的消息。與成功的消息有一個環節使用jQuery在twitter引導模式中設置鏈接href屬性
<a href="#" id="register_again">Add another registration </a>
當我嘗試設置這個鏈接指向當前URL
jQuery(document).ready(function(){
var url = window.location.href;
jQuery('#register_again').attr('href', url + '®ister_again');
});
,但它並沒有改變的鏈接,仍然#,它工作正常沒有模態,如果我把它作爲一個正常的HTML
消息正在通過ajax獲取,我編輯了ajax函數來設置url,它的工作原理。你的代碼是正確的,但我認爲,當我從ajax接到電話時,每件事都應該在那裏定義。謝謝 –