2019-04-17的一些問題

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 }"
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章