再jsp页面中引入prototype.js,页面就会出现JS错误“对象不支持此属性或方法” 再jsp页面中引入prototype.js,页面就会出现JS错误“对象不支持此属性或方法” 有没有遇到过这种错误 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 应该可能性不大 firefox下一点问题都没有 只有ie出错,还有要是引用路径出错不能使用ajax,使用还是正常<%@ include file="/includes/taglibs.jsp"%><%@ page contentType="text/html;charset=UTF-8"%><script src="${ctx}/scripts/prototype.js"></script><script type="text/javascript">function setValue(){ var active = document.getElementById('isFaq'); if (active.checked==true){ active.value='true'; }else{ active.value='false'; }}function validateNumber(){ var url="${ctx}/attendant/KbsEntry/checkNumberExists.do?number="+document.getElementById('number').value; var request=new Ajax.Request(url,{method:"get",onComplete:doValidate}); } function doValidate(request){ var text=request.responseText; if(text=="true"){ if(confirm('你输入的编号已存在')){ document.getElementById('number').value=""; document.all.number.focus(); } }}</script> <tr> <td height="30" width="20%"><strong><font color="#FF0000"></font> <fmt:message key="entry.isFaq"/>:</strong> <c:choose> <c:when test="${isfaq=='true'}"> <input type="checkbox" id="isFaq" name="isFaq" checked onclick="setValue()";> </c:when> <c:otherwise> <input type="checkbox" id="isFaq" name="isFaq" onclick="setValue()";> </c:otherwise> </c:choose> </td> </tr> <tr> <td height="30" valign="bottom" align="left"><strong><font color="#FF0000">*</font> <fmt:message key="entry.number"/>:</strong></td> </tr> <tr> <!-- <td width="100%" align="left"><input name="number" type="text" id="number" class="text medium required validate-length-range-3-20 validate-ajax" validateUrl="${ctx}/attendant/KbsEntry/checkNumberExists.do" validateFailedMessage="编号已经存在" style="width: 100%"></td> --> <td width="100%" align="left"><input name="number" type="text" id="number" onchange="validateNumber()" style="width:100%"></td> </tr> <tr> <td height="30" valign="bottom" align="left"><strong><font color="#FF0000">*</font> <fmt:message key="entry.subject"/>:</strong></td> </tr><tr> <td width="100%" align="left"><input name="subject" type="text" id="subject" class="required max-length-200" style="width: 100%"></td></tr><tr> <td height="30" valign="bottom" align="left"><strong><font color="#FF0000">*</font> <fmt:message key="entry.sort"/>:</strong></td> </tr><tr> <td width="100%" align="left"> <select name="kbsSortId" id="kbsSortId" size="8" class="required" style="width: 100%;"> <c:forEach items="${kbsSortsList}" var="sort"> <c:choose> <c:when test="${kbsSort != null && kbsSort.id == sort.id}"><option value="${sort.id}" selected>${sort.name}</option></c:when> <c:otherwise><option value="${sort.id}">${sort.name}</option></c:otherwise> </c:choose> </c:forEach> </select> </td></tr><tr> <td height="30" valign="bottom"><strong><font color="#ff0000">*</font> <fmt:message key="entry.content"/>:</strong></td> </tr><tr> <td width="100%" align="left"> <textarea name="content" id="content" rows="20" style="width: 100%"></textarea> </td></tr> 请教text中多值的sql写法 小弟拜求 :如何点击修改之后在修改页能显示出原来的值 请教: file javax\servlet\jsp\PageContext.class not found 用Sybase,如何写data-source的各属性? 菜鸟数据库问题。在线等 上传文件出错 jbossz中的errorpage如何实现 请大家帮忙看看! 求助!!!!!!!!!!JSP页面可以识别session不可以识别model传递的值 页面上的那些个连接是怎么生成的?(大脑突然一片空白,怎么也想不起来) 用MyEclipse开发struts是否需要在配置文件声明
<%@ page contentType="text/html;charset=UTF-8"%>
<script src="${ctx}/scripts/prototype.js"></script>
<script type="text/javascript">
function setValue(){
var active = document.getElementById('isFaq');
if (active.checked==true){
active.value='true';
}else{
active.value='false';
}
}
function validateNumber(){
var url="${ctx}/attendant/KbsEntry/checkNumberExists.do?number="+document.getElementById('number').value;
var request=new Ajax.Request(url,{method:"get",onComplete:doValidate});
}
function doValidate(request){
var text=request.responseText;
if(text=="true"){
if(confirm('你输入的编号已存在')){
document.getElementById('number').value="";
document.all.number.focus();
}
}
}
</script> <tr>
<td height="30" width="20%"><strong><font color="#FF0000"></font> <fmt:message key="entry.isFaq"/>:</strong>
<c:choose>
<c:when test="${isfaq=='true'}">
<input type="checkbox" id="isFaq" name="isFaq" checked onclick="setValue()";>
</c:when>
<c:otherwise>
<input type="checkbox" id="isFaq" name="isFaq" onclick="setValue()";>
</c:otherwise>
</c:choose>
</td>
</tr>
<tr>
<td height="30" valign="bottom" align="left"><strong><font color="#FF0000">*</font> <fmt:message key="entry.number"/>:</strong></td>
</tr>
<tr>
<!-- <td width="100%" align="left"><input name="number" type="text" id="number" class="text medium required validate-length-range-3-20 validate-ajax" validateUrl="${ctx}/attendant/KbsEntry/checkNumberExists.do" validateFailedMessage="编号已经存在" style="width: 100%"></td> -->
<td width="100%" align="left"><input name="number" type="text" id="number" onchange="validateNumber()" style="width:100%"></td>
</tr>
<tr>
<td height="30" valign="bottom" align="left"><strong><font color="#FF0000">*</font> <fmt:message key="entry.subject"/>:</strong></td>
</tr>
<tr>
<td width="100%" align="left"><input name="subject" type="text" id="subject" class="required max-length-200" style="width: 100%"></td>
</tr>
<tr>
<td height="30" valign="bottom" align="left"><strong><font color="#FF0000">*</font> <fmt:message key="entry.sort"/>:</strong></td>
</tr>
<tr>
<td width="100%" align="left">
<select name="kbsSortId" id="kbsSortId" size="8" class="required" style="width: 100%;">
<c:forEach items="${kbsSortsList}" var="sort">
<c:choose>
<c:when test="${kbsSort != null && kbsSort.id == sort.id}"><option value="${sort.id}" selected>${sort.name}</option></c:when>
<c:otherwise><option value="${sort.id}">${sort.name}</option></c:otherwise>
</c:choose>
</c:forEach>
</select>
</td>
</tr>
<tr>
<td height="30" valign="bottom"><strong><font color="#ff0000">*</font> <fmt:message key="entry.content"/>:</strong></td>
</tr>
<tr>
<td width="100%" align="left">
<textarea name="content" id="content" rows="20" style="width: 100%"></textarea>
</td>
</tr>