javascript按钮单击以转到特定视图 [英] javascript button click to go to specific view

查看:54
本文介绍了javascript按钮单击以转到特定视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,



我有以下脚本,当viewbag属性为true时会显示弹出窗口。它的工作正常。我想移动到ex的视图:单击按钮Go to reciept时的收据/索引。给我你的建议。我该怎么办?

Hello,

I have the following script which would show the popup when the viewbag property is true. its working fine. I would like to move to the view for ex: receipt/index when button Go to reciept is clicked. Give me your suggestions. How can i do it?

@if (ViewBag.ShowMessage==true)
{
    <script>
        $(function () {
            $("#dialog-confirm").dialog({
                resizable: false,
                scrollable: false,
                height: 180,
                modal: true,
                buttons: {
                    "Go to Reciept": function () {
                        $(this).dialog("close");
                    },
                    Cancel: function () {
                        $(this).dialog("No, Just save it");
                    }
                }
            });
        });
  </script>
  <div id="dialog-confirm" title="Alert?">
  <p><span class="ui-icon ui-icon-alert" style="float: left; margin: 0 7px 50px 0;"></span>Do you want to do a voucher now?</p>
</div>
}

推荐答案

function (){


#dialog-confirm)。dialog({
resizable: fals e
可滚动: false
height: 180
模态: true
按钮:{
转到Reciept function (){
("#dialog-confirm").dialog({ resizable: false, scrollable: false, height: 180, modal: true, buttons: { "Go to Reciept": function () {


)。dialog( close);
},
取消:功能(){
(this).dialog("close"); }, Cancel: function () {


这篇关于javascript按钮单击以转到特定视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆