柯聞折Javascript物件導向方法是物件的函數
物件導向設計OOP=Object-Oriented Programming 主詞subject受詞object東方的oriental id=identity,身分證id card, division區塊,段落 .方法get()是取得對應的值,功能同字典 dict.get(s1.code)從dict字典取得索引為s1.code的值 劉任昌以上的程式碼 <H1>物件導向設計OOP=Object-Oriented Programming</H1> 主詞subject受詞object東方的oriental <P id="cat"></P> <P id="dog"></P> <P>id=identity,身分證id card, division區塊,段落</P> <script>//Javascript註解二斜線//Python註解# dict =new Map([["2303","聯電"],["2330","台積電"],["2880","華南金"]]);//宣告配對(字典) class Stock{ //宣告類別 constructor(code, shares, price){//建構子constructor this.code = code; this.shares = shares; this.price = price;} } s1 = new Stock("2330", 100, 1000); //建構子Stock建構s1 s2 = new Stock("2880", 1000, 30); //建構子Stock建構s2 st = s1.code+' 股數 '+s1.shares.toString()+'<BR>'+s2.code.toString()+' 股數 '+s2.shares; document.getElementById('cat...
https://whitexd.blogspot.com/2023/11/vscode-html-css-js.html
回覆刪除https://kitty030994.blogspot.com/2023/11/vscodecssjs.html
回覆刪除https://wilson11122.blogspot.com/2023/11/blog-post.html
回覆刪除https://leeyicheng0531.blogspot.com/2023/11/blog-post.html
回覆刪除https://hui026.blogspot.com/2023/11/vscodecssjs.html
回覆刪除https://amyxl6316.blogspot.com/2023/11/htmlcssjavascriptjavapython.html
回覆刪除https://yun0205.blogspot.com/2023/11/vscodecssjs.html
回覆刪除https://cindy650092.blogspot.com/2023/11/blog-post.html
回覆刪除https://xi715.blogspot.com/2023/11/vscodecssjs.html
回覆刪除https://ctz642895.blogspot.com/2023/11/vscodecssjs.html
回覆刪除https://grace8166.blogspot.com/2023/11/htmlcssjavascriptjavapython.html
回覆刪除https://htmlcssjavascriptjavapython.blogspot.com/2023/11/vscodecssjs.html
回覆刪除https://yuechen613.blogspot.com/2023/11/vscodecssjs.html
回覆刪除https://rrrrr-eeeee.blogspot.com/2023/11/blog-post.html
回覆刪除https://keiime.blogspot.com/2023/11/h1background-color-tomato-color-white.html
回覆刪除https://asd0908449304.blogspot.com/2023/11/vscodecssjs.html
回覆刪除https://njcjww.blogspot.com/2023/11/xu3.html
回覆刪除https://lawrence655064.blogspot.com/2023/11/blog-post.html
回覆刪除https://oscarliu1688.blogspot.com/2023/11/vscode-html-css-js.html
回覆刪除https://kk0725.blogspot.com/2023/11/vscodecssjs.html
回覆刪除https://htmlcssjavascriptjavapython.blogspot.com/2023/12/w3schoolcanvassvg.html
回覆刪除