Jer*_*emy 1 javascript jquery javascript-events
我有一个地址列表和我生成的其他值,并且我在每行旁边都包含一个链接(见下图):

我需要能够单击行旁边的"安排此清理"链接,并让它将该特定信息发送到页面下方的某些隐藏输入字段,所有这些都无需重新加载页面.我需要使用单个onClick事件使用各种数据填充多个输入.
我已经在使用jQuery,所以任何特定于jQuery的解决方案也是受欢迎的.
任何帮助将不胜感激.谢谢!
即使没有JQuery它也很直接:
<input ... onclick="return myFunction();">
Run Code Online (Sandbox Code Playgroud)
function myFunction(){
document.getElementById("myHiddenInput").value = "some value that i want to have";
return true; //if you want to proceed with the submission or whatever your button does, otherwise return false
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
11343 次 |
| 最近记录: |