【问题标题】:showing the newly opened window in smaller size like a popup以较小的尺寸显示新打开的窗口,如弹出窗口
【发布时间】:2021-08-29 10:56:27
【问题描述】:

我有代码使用 ajax 调用重定向到 MVC.net 中的另一个页面。下面是我为此目的使用的代码。但是通过使用该代码,我可以重定向到另一个完整尺寸的页面。但我想像弹出窗口一样以较小的尺寸打开新页面。有人可以告诉我需要做什么更改吗?

onClick: function (e) 
{
    $.ajax
        ({
            type: "GET",
            url: "/Home1/UploadFile", 
            data: { key: selectedKey },
            success: function (result) 
            {
                window.location.href = '@Url.Action("UploadFile", "Home1")';
            },
            error: function (req, status, error) 
            {
                alert('error');
            }
        });
}

【问题讨论】:

    标签: .net ajax model-view-controller


    【解决方案1】:

    看看这个帖子。

    我认为您可以将这种方法应用于您的方法。

    onclick open window and specific size

    【讨论】:

    • 感谢您的建议。它对我有用
    猜你喜欢
    • 2012-12-02
    • 2014-05-02
    • 2020-05-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-10-26
    • 1970-01-01
    相关资源
    最近更新 更多