js 模拟表单提交

var form = $("<form>");
        form.attr("style", "display:none");
        form.attr("target", "");
        form.attr("method", "post");
        form.attr("action", "/dev/titan2/DownloadSmpZip");
        var input1 = $("<input>");
        input1.attr("type", "hidden");
        input1.attr("name", "smp_ids");
        input1.attr("value", ids);
        var input2 = $("<input>");
        input2.attr("type", "hidden");
        input2.attr("name", "tsk_id");
        input2.attr("value", gtask_now.id);
        $("body").append(form);
        form.append(input1);
        form.append(input2);
        form.submit();
        form.remove();

js 模拟表单提交

上一篇:js计算时间差(天,小时,分钟,秒)


下一篇:JSP基础(一)--九大内置对象