【发布时间】:2014-11-24 05:01:18
【问题描述】:
我想传递 html 表单的两个输入字段值并通过 JavaScript 将它们连接起来。当我发送一个值并且 concat 函数采用一个参数时,就可以了。但是当发送两个值并且 concat 函数采用两个参数时,它在 concat 函数中打印 > 并与 user_name 连接。我还需要从 user_name 字段传递标题。
<form "method="post"action="signup.php">
<label>Name:</label>
<input type="text" name="title" id="title" />
<br/>
<label>Email:;
<input type="text" name="user_name" id="user_name" onkeyup="concat(this.value,title.value)" />
</form>
【问题讨论】:
标签: javascript c# html asp.net-mvc forms