1
我最近抓到Alertify
庫的副本,但無法獲得prompt
的工作。Alertify提示不起作用
我的應用程序是使用Bootstrap的.NET MVC。
這是我的我的HTML(除去大部分的選項標籤的能見度)的剪斷:
<div class="row">
<div class="col-md-3">
Model
</div>
<div class="col-md-9">
<select id='selmodels' class='w250' type='model'><option class='w250' value='0'></option></select>
<div id="edit" class="btn btn-default">Edit</div>
</div>
</div>
這是腳本(這是不同的,但改爲alertify例如在調試時):
$(document).ready(function() {
$('#edit').click(function() {
//var name = $('#selmodels option:selected').text();
alertify.prompt('This is a prompt dialog!', 'some value',
function(evt, value) { alertify.message('You entered: ' + value); }
);
return false;
});
})
然而點擊 '編輯' 給出了錯誤:
fn must be a function
什麼是錯的w ^這是什麼?
你說得對。 http://alertifyjs.com/prompt.html上的示例是錯誤的!謝謝 :) – CompanyDroneFromSector7G