`
etoaoo
  • 浏览: 18657 次
  • 性别: Icon_minigender_1
  • 来自: 北京
文章分类
社区版块
存档分类
最新评论

Js solution for POST

阅读更多

Javascript solution for post:


function openWindowWithPost(url,name,keys,values)
{
    var newWindow = window.open(url, name);
    if (!newWindow) return false;
    var html = "";
    html += "<html><head></head><body><form id='formid' method='post' action='" + url + "'>";
    if (keys && values && (keys.length == values.length))
    for (var i=0; i < keys.length; i++)
    html += "<input type='hidden' name='" + keys[i] + "' value='" + values[i] + "'/>";
    html += "</form><script type='text/javascript'>document.getElementById(\"formid\").submit()</script></body></html>";
    newWindow.document.write(html);
    return newWindow;
}

works in IE and firefox

分享到:
评论

相关推荐

    i18next: A Solution for Front End i18n Message

    **标题解析:** "i18next: A Solution for Front End i18n Message" 这个标题提到了“i18next”和前端国际化(i18n)消息处理。i18n是一个术语,代表国际化的缩写,通常指的是软件或网站的设计和实现,使其能够适应...

    Module5-Solution.github.io

    1. **基础语法**:包括变量声明(let, const, var)、数据类型(string, number, boolean, null, undefined, object, array, symbol, bigint)、条件语句(if/else, switch)、循环(for, while, do/while, for...of...

    How to Create an HTML Editor for ASP.NET AJAX-HtmlEditor.VS2005

    5. **Solution File (HtmlEditor.VS2005.sln)**:这是一个Visual Studio解决方案文件,用于管理和组织项目中的所有相关组件,包括HtmlEditor的源代码、资源和其他依赖项。 6. **Site**:可能指的是项目的站点配置或...

    Sap Ruby Ajax

    The integration of SAP and Ruby on Rails, combined with AJAX, offers a powerful solution for managing SAP R/3 user accounts within a modern web application. By leveraging the built-in AJAX ...

    asp.net mvc

    Enabling validation selectively for buttons lets you create forms that can post information even if a form is not complete or if the form contains data that is temporarily invalid. Client validators ...

    apify:适用于基于浏览器的Fetch API的API解决方案!

    apifyA api solution for web browser based Fetch api!api.method(payload, option);Description基于fetch api的前端数据链路层封装,可以达到一次配置随意轻松使用!apify 提供了以下功能requset用于发送请求支持...

    Module-5-assignment-solution:FoodHud餐厅模块5

    文件名“Module-5-assignment-solution-master”表明这是一个项目的主分支,可能包含了完成这个模块所需的全部代码和资源。开发者可能需要结合其他技术,如CSS和JavaScript,进一步完善和优化这个Web应用。

    Total Commander(TC)的CudaLister插件(32位和64位),含223个语法高亮文件,可预览大量文本文件类扩展名

    MSVS_Solution.lcf Swift.lcf ASAP2_database.lcf ASAP2_Meta_Language.lcf Julia.lcf AppleScript.lcf R.lcf Dart.lcf Scheme.lcf Fortran.lcf WSH_script.lcf CMake.lcf Stylus.lcf Jade.lcf Text_...

    Express实现前端后端通信上传图片之存储数据库(mysql)傻瓜式教程(二)

    为了更直观地操作数据库,可以下载并使用可视化工具Navicat for MySQL,它提供了图形化的数据库管理界面。 首次登录MySQL数据库,可使用命令`mysql -uroot -p`,如果设置了密码,则会提示输入。如果在输入中文时...

    外文翻译 stus MVC

    The page designer (or HTML developer) must understand colors, the customer, product flow, page layout, browser compatibility, image creation, JavaScript, and more. Putting a great looking site ...

    ACCP6.0单词表

    - **Span**:无语义的内联元素,用于应用样式或添加JavaScript事件。 **第二章:表单控件** - **Form**:定义了表单的属性和行为。 - **Action**:表单提交的目标地址。 - **Method**:表单提交的方法(GET或POST...

    ASP.NET2.0高级编程(第4版)1/6

    2.4 Solution Explorer26 2.5 Server Explorer28 2.6 Properties窗口28 2.7 丢失的窗口29 2.8 其他常见的Visual Studio操作29 2.8.1 创建新项目29 2.8.2 引用其他对象30 2.8.3 使用智能标记32 2.8.4 保存和导入  ...

    2.ASP.NET.2.0.高级编程(第4版) [1/7]

    2.4 Solution Explorer 26 2.5 Server Explorer 28 2.6 Properties窗口 28 2.7 丢失的窗口 29 2.8 其他常见的Visual Studio操作 29 2.8.1 创建新项目 29 2.8.2 引用其他对象 30 2.8.3 使用智能标记 32 2.8.4...

Global site tag (gtag.js) - Google Analytics