【发布时间】:2013-10-12 21:30:12
【问题描述】:
我的页面中有一个文本框和按钮。我有几套以下用于不同目的。
<input type="text" id="new" name="new" value="1" />
<input type="button" value="Edit" onclick="compute(edit(xxx));" />
单击按钮后,我想调用一个 javascript 函数,该函数将接收文本框中输入的值。现在我想知道如何从输入“new”中检索值并将“xxx”作为参数传递给它?
【问题讨论】:
-
试试
compute(edit(document.getElementById('new').value))
标签: javascript html function button textbox