jQuery可以确认如何将此脚本添加到按钮 [英] jQuery can you confirm this how to add this script to an button
本文介绍了jQuery可以确认如何将此脚本添加到按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想将此代码添加到删除按钮,但我不能使用jQuery工作
我应该写这段代码所以
i want to add this code to a delete button, but i dont get it to work using jQuery
were should i write this code and so an
jConfirm('Can you confirm this?', 'Confirmation Dialog', function(r) {
jAlert('Confirmed: ' + r, 'Confirmation Results');
});
i我正在使用sharepoint开发
i am using sharepoint development
推荐答案
你好,
确保您的删除按钮被声明为类似
Hello,
Make sure that your delete button is declared something like this
<asp:Button ID="TestButton3" OnClientClick="return AreYouSure();" OnClick="InvokeServerSideMethod" Text="A asp button" runat="server"/>
然后编写类似于下图所示的AreYouSure函数。
Then write your AreYouSure function similar to one shown below.
function AreYouSure() {
var result = jConfirm('Can you confirm this?', 'Confirmation Dialog', function(r) {
jAlert('Confirmed: ' + r, 'Confirmation Results');
});
return result;
}
问候,
Regards,
这篇关于jQuery可以确认如何将此脚本添加到按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文