- Java code
<% if(obj.getIsEditable().equals("0")){ %> <textarea id="sendContent" name="sendContent" disabled onchange="countSmsNum()" cols="70" rows="8"><% if(FilePath.isAddUserCodeToMsgContent){ %>${ param.AgentCode } <% } %>${template.content}</textarea> <% }else{ %> <textarea id="sendContent" name="sendContent" cols="70" onchange="countSmsNum()" rows="8"><% if(FilePath.isAddUserCodeToMsgContent){ %>${ param.AgentCode } <% } %>${template.content}</textarea> <% } %>
- Java code
disabled onchange="countSmsNum()"
------解决方案--------------------------------------------------------
disabled为禁用一个HTML元素;
onchange="countSmsNum()" 是去调用javascript方法;其中,onchange是事件名称;countSmsNum()是被调用的函数方法名称;