1、Parameter index out of range (3 > number of parameters, which is 2).
翻译为:找到了1个问号,却插入了2个值,导致参数越界(根据得到的信息打印将很容易判断数据是否与数据库字段匹配等小问题)。
怎么说呢,我在xml文件里,有代码注释掉了,里面有所谓的问号
/* xx = #{xxx} */ ==> /* xx = ? */
删掉这个注释就好了。。。。。。
2、返回上一页
function goBack(){
if ((navigator.userAgent.indexOf('MSIE') >= 0) && (navigator.userAgent.indexOf('Opera') < 0)){ // IE
if(history.length > 0){
window.history.go( -1 );
}else{
window.opener=null;
window.open('','_self');
window.close();
}
}else{ //非IE浏览器
if (navigator.userAgent.indexOf('Firefox') >= 0 ||
navigator.userAgent.indexOf('Opera') >= 0 ||
navigator.userAgent.indexOf('Safari') >= 0 ||
navigator.userAgent.indexOf('Chrome') >= 0 ||
navigator.userAgent.indexOf('WebKit') >= 0){
if(window.history.length > 1){
window.history.go( -1 );
}else{
window.opener=null;
window.open('','_self');
window.close();
}
}else{ //未知的浏览器
window.history.go( -1 );
}
}
}
3、关于密码框的复制粘贴
<input name="pwd" type="password" id="pwd" onpaste="return false" oncontextmenu="return false" oncopy="return false" oncut="return false"/>
onpaste:粘贴时触发的事件
oncontextmenu:右键弹出属性菜单
oncopy:实现拷贝,复制
oncut:剪切
4、vue里面设置maxlength
attr | 设置原生属性,例如 :attr="{ maxlength: 10 }" |