如何在asp.net2.0中编写jquery,我点击按钮显示确认框根据要求
警告框也会根据情况显示图像和标题。
功能: $(“#confirm_button”)。click(function(){
jConfirm('Can you confirm this?', 'Confirmation Dialog', function(r) {
jAlert('Confirmed: ' + r, 'Confirmation Results');
});
});
我点击按钮代码,如
**
> <input id="confirm_button" > type="button" value="Show Confirm" />
**
请帮助我
THNAK U. HEMANTH
答案 0 :(得分:2)
$(document).ready(function()
{
$("#iId").click(function ()
{
if (confirm('Your confirm text?'))
{
//confirm='true', (means if you click on ok)
// your code will go hire
}
else
{
//confirm='false', (means if you click on cancle)
// your code will go hire
}
});
});
注意:您必须在代码中保留jquery-ui脚本文件
答案 1 :(得分:1)
您应该查看jquery UI对话框: http://jqueryui.com/demos/dialog/
希望这会有所帮助。干杯