Jquery即兴>转到网址
经过尽可能多的研究后,我没有找到一个可行的解决方案来解决这个看似简单的问题。
我想使用 Jquery Impromptu。
简单的动作。
单击“注销” -
注销
提示“您确定 - 是/否”
如果取消,则什么也不会发生。如果为 True,则转到 url 'logoutscript.php'。
我无法让自己的想法发挥作用,尽管我就是无法集中注意力。任何帮助都会非常有帮助。
++++++++++++++++++++++++++++++++++
function removeUser(id){
var txt = 'Are you sure you want to Logout?';
$.prompt(txt,{
buttons:{Logout:true, Cancel:false},
callback: function(v,m,f){
<!-- This is wher the problem starts -->
++++++++++++++++++++++++++++++++++
a class="link" href="javascript:;" onclick="removeUser(1); ">Logout</a>
After as much research as possible I don't have a working solution to what seems a simple problem.
I would like to use Jquery Impromptu.
Simple action.
Click on Logout –
<a class="link" href="javascript:;" onclick="logout(1); ">Logout</a>
Prompt 'Are you sure - Yes / No'
If Cancel, Nothing happens. If True go to a url 'logoutscript.php'.
I cannot get my thoughts to work and though I just cannot get my head around it. Any help would be really helpful.
++++++++++++++++++++++++++++++++++
function removeUser(id){
var txt = 'Are you sure you want to Logout?';
$.prompt(txt,{
buttons:{Logout:true, Cancel:false},
callback: function(v,m,f){
<!-- This is wher the problem starts -->
++++++++++++++++++++++++++++++++++
a class="link" href="javascript:;" onclick="removeUser(1); ">Logout</a>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这应该有效:
HTML
JS
如果需要,您也可以内联调用该方法。
对于未来:请提供完整且格式化的代码。在您的列表中,有一个方法称为
logout
,在代码示例removeUser
中,然后代码在左大括号后中断。This should work:
HTML
JS
You can as well call the method inline, if you need to.
For the future: Please provide complete and formatted code. In your list a method is called
logout
, in the code sampleremoveUser
, then the code breaks up after an opening curly bracket.