javascript按钮单击以转到特定视图

编程入门 行业动态 更新时间:2024-10-12 18:19:42
本文介绍了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按钮单击以转到特定视图

本文发布于:2023-11-11 05:31:01,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1577516.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:转到   视图   单击   按钮   javascript

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!