阻止在新标签中打开链接

时间:2015-11-20 06:25:46

标签: javascript jquery html asp.net-mvc

我在我的某个操作方法中使用return作为<form action="/controller/actionmethod" enctype="multipart/form-data" id="excelUploadForm" method="post" name="excelUploadForm" target="FileUploadTarget"> //some contents inside form </form> <iframe id="FileUploadTarget" name="FileUploadTarget" > </iframe> 语句。

注意: 我无法上传完整的代码,因为我正在项目中解决这个问题。

我的表单是这样的:

return new WrappedJsonResult
            {
                Data = new
                {
                    isSuccess = true,
                    CusEvent = "close",
                    CusMsg = "File Uploaded Successfully"
                }
            };

我的代码是:

textarea

成功上传后,上面的 jsonresult 会在WrappedJsonResult的新标签页中打开。

生成的Html&amp; 在新标签中打开 以获取<html> <head></head> <body> <textarea id="jsonResult" name="jsonResult"> { "isSuccess":true, "CusEvent":"close", "CusMsg":"File Uploaded Successfully" } </textarea> </body> </html>

iframe

我的问题:

Jsonresult在新标签页中打开。我想阻止它。

我无法模拟问题发生的位置。是否由于WrappedJsonResult$(".k-delete").parent().click(); 或其他原因而发生此事。

这有什么问题?。

0 个答案:

没有答案
相关问题