發表文章

目前顯示的是 11月, 2019的文章

[Angular] Uncaught ReferenceError: Cannot access 'X' before initialization

 Uncaught ReferenceError: Cannot access 'X' before initialization 出這種錯誤 先檢查 constuctor有沒有互相引用的問題 這次出問題 在於 B service中引用A service 但是 A service中也有引用B service 所以造成這錯誤

[JavaScript] 身分證產生器

  function   getTwID ()   {        //  建立字母分數陣列(A~Z)        const   city   =   new   Array (          1 ,          10 ,          19 ,          28 ,          37 ,          46 ,          55 ,          64 ,          39 ,          73 ,          82 ,          2 ,          11 ,          20 ,   ...

[JavaScript] 判斷字串是中文、英文,還是數字

//  驗證是否是中文 var   pattern   =   new   RegExp ( " [ \u 4E00- \u 9FA5]+ " ) ; var   str   =   " 中文 " ; if  ( pattern . test ( str ))  {    alert ( " 該字串是中文 " ) ; } //  驗證是否是英文 var   pattern2   =   new   RegExp ( " [A-Za-z]+ " ) ; var   str2   =   " abcdefsgaaweg " ; if  ( pattern2 . test ( str2 ))  {    alert ( " 該字串是英文 " ) ; } //  驗證是否是數字 var   pattern3   =   new   RegExp ( " [0-9]+ " ) ; var   str3   =   " 234234 " ; if  ( pattern3 . test ( str3 ))  {    alert ( " 該字串是數字 " ) ; } //  ———————————————— //  版权声明:本文为CSDN博主「Ly的博客」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。 //  原文链接:https://blog.csdn.net/LY9457/article/details/88857457

[Angular Material] Input 配 AutoComplete 配reactive form 及顯示和回傳達成不同值做法

 Input 配 AutoComplete 配reactive form 及顯示和回傳達成不同值 做法留存 HTML     < mat-form-field   style = " width:50% " >            < input              matInput              placeholder = " 國籍 "              [matAutocomplete] = " countries "              [formControl] = " bci0180Control "             />          </ mat-form-field >          < mat-autocomplete            #countries = " matAutocomplete "         ...