【发布时间】:2015-08-29 15:24:07
【问题描述】:
有没有一种简单的方法可以将另一个可见文本输入值中的值以一种形式发送到隐藏输入值?我的点击操作将根据操作来源使用不同的引用名称。看我的例子:
<form id="floatleft" method="post">
<label for="name">My Name:</label>
<input name="senderName" type="text" value="">
<input name="first_name" type="hidden" value="">
<input alt="P" name="submit" type="image" src="https://p.gif" value="P" onclick="this.form.action='https://p.html'" />
<input alt="z" name="submit" type="image" src="https://www.z.png" value="z" onclick="this.form.action='https://www.z.com/';" />
【问题讨论】:
-
使用 JS,您可以在可见输入更新时更新隐藏输入值..
-
你能给我举个例子吗?
-
您能否向我们展示您尝试使用的代码示例? 编辑你的问题,不要放在评论中
标签: php forms hidden-field