<script>
function show(){
var aac = document.getElementsById("aaflag");
alert(aac.value);
alert("Readonly\'s pet name is \"Cross Bone\"");
}
</script>
<table>
<tr>
<td style="font-size:14px"><@s.text name="commin.name"/></td>
<td><input type="text" name="commname" id="aaflag" value="keke" cssStyle="border:1px solid #336699;color:#00f;background-color:#efefef"/></td>
</tr>
<tr>
<td>
<@s.submit value="登录" οnclick="show();" cssStyle="border:1px solid #336699;color:#fff;background-color:#336699"/>
</td>
</tr>
</table>
这样子获取输入框的值为什么在freemarker中会提示没有document.getElementById不存在该属性或方法啦?请知情者帮忙解答一下,正确的写法是怎么样的?