gpt4 book ai didi

html - 提交时设置表单的 Action 属性?

转载 作者:技术小花猫 更新时间:2023-10-29 11:42:44 25 4
gpt4 key购买 nike

如何在单击提交按钮后立即更改表单的操作属性?

最佳答案

<input type='submit' value='Submit' onclick='this.form.action="somethingelse";' />

或者您可以从表单外部修改它,以正常方式使用 javascript:

 document.getElementById('form_id').action = 'somethingelse';

关于html - 提交时设置表单的 Action 属性?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5640916/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com