87,920
社区成员
发帖
与我相关
我的任务
分享
<table border="1" width="80%" align="center" style="border-collapse:separate; border-spacing:15px;">
<tr><th >方法名称</th><th>函数参数</th><th>预期结果</th><th>实际结果</th><th>操作</th></tr>
#foreach($function in $functionEnum)
<tr>
<td>$function.code $function.name<input type="hidden" value="$function.code" id="td1_$function.code"/></td>
<td><input type="text" value="" id="td2_$function.code"/></td>
<td><span id="fwResult"></span></td>
<td><span id="td3$function.code"></span></td>
<td align="center" valign="middle"><input type="button" value="提交" onclick="ljlfunction('td2_$function.code','td1_$function.code')"/></td>
</tr>
</table>
<script type="text/javascript">
function ljlfunction(id1,id2) {
var params = document.getElementById(id1).value;
alert(params);
var x = document.getElementById(id2).value;
alert(x);
}
</script>
<script type="text/javascript">
function ljlfunction() {
var params = document.getElementById("td2_$function.code").value;
alert(params);
var x = document.getElementById("td1_$function.code").value;
alert(x);
}
//少了}符号
</script>