weixin_33699914 2018-01-24 09:34 采纳率: 0%
浏览 15

在动态链接上提交表格

Here is the code below which i am using to submit my form. When i click the link, the new window is behaving as current window and the Current window is behaving as new action link. How can i stop this behaviour.

I am reading the linkURL in a java class from JVM parameters.

<form action="<c:out value='${config.linkURL}'/>" method="GET" id="myForm">
    <a href="#" target="_blank" id="myLink"><bean:message key="link.cardholder.info"/></a>
    <input type="hidden" name="cardID" value="<c:out value="${config.homeSwitch}"/>" />
    <script>
         $('#myLink').on('click', function() { window.open('<c:out value="${config.linkURL}"/>',"title").focus();});
    </script>
</form>

when i tried here the hidden values are not passing along with the url because of not calling submit() function. Any possible way to call submit function.

  • 写回答

1条回答 默认 最新

  • Memor.の 2018-04-09 02:04
    关注

    This link will provide you with detailed info about the HTMLFormElement.

    This link will explain what the submit method of the HTMLFormElement is.

    Something like:

    myForm.submit();
    
    评论

报告相同问题?

悬赏问题

  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器