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