原创 Windows下配置安裝Git(二)

一、綁定GitHub用戶名和郵箱 啓動git bash 輸入 git config --global user.name "你的用戶名" 回車 輸入git config --global user.email "你的郵箱" 回車 二、創

原创 Windows下配置安裝Git(一)

進行本教程前需要在GitHub上註冊賬號,一定要記住郵箱、用戶名和密碼呀! 一、下載安裝Git Git 各平臺安裝包下載地址爲:http://git-scm.com/downloads 下載Windows版本,安裝到電腦即可。 安裝後如何啓

原创 判斷對象中是否有某個屬性

if (date.hasOwnProperty("course")){ console.log("date對象中有course的屬性"); } else { console.log("date對象中沒有course的屬性")

原创 js一維數組中數值排序

var a=[1,2,3,5]; alert(Math.max.apply(null, a));//最大值 alert(Math.min.apply(null, a));//最小值

原创 ionic和type=“radio”兩種多選框寫法

//ionic寫法 <ion-list> <ion-radio ng-repeat="item in project_level" ng-value="item.text" ng-model="new_data.level">

原创 js獲取日期格式爲年-月-日

var date = new Date(); var nowMonth = date.getMonth() + 1; var strDate = date.getDate(); var seperator = "-"; if (nowMon

原创 vue刷新頁面-

在App.vue中修改: 1.<router-view>標籤中添加判斷條件v-if="isRouterAlive" <router-view v-if="isRouterAlive"></router-view> 2.data()函數中添

原创 判斷對象屬性中是否有空值

//examdata是你要判斷的對象 var arr; if ((arr = Object.keys(examdata).filter(v=>!examdata[v])).length<=0) { console.log("無空值

原创 Windows下配置安裝Git(三)--版本回退

一、版本回退 1.繼教程(二)提交某個文件後,再修改這個文件,再提交一次 注:紅框的數字是該文件的版本號,後文可能會用到。 2.查看歷史記錄 輸入命令:git log 回車,即可查看之前版本 如果嫌棄顯示log內容過多,可輸入命令:g

原创 鼠標移動到圖片改變圖片

<img src="app/css/images/pull_gray.png" class="list-img" onMouseOver="this.src='app/css/images/pull_blue.png'" onMouseOu

原创 <marquee> 標籤實現文字左右滾動

<marquee id="mymarquee" onmouseover="mymarquee.stop()" onmouseout="mymarquee.start()" scrollAmount="5" scrollDelay="50"

原创 如何將變量值爲字符串true或false轉爲Boolean型

”true“ === ’true‘ 返回boolean爲true “false“=== ’true‘ 返回boolean爲false console.log(變量值 === ‘true’); 輸出到控制檯即可測試。

原创 去除數組中重複的屬性值

//去除數組中重複的屬性值 var unique = {}; $scope.my_students.forEach(function(gpa) { unique[JSON.stringify(gpa)] = gpa });

原创 Windows下配置安裝Git(四)

一、在GitHub上新建一個庫 1.點擊New repository 2.輸入你的庫的名字,如:angular_cc 3.點擊Create repository,即可完成創建。 點擊Create repository後,即可看到GitH

原创 解決select下拉的第一個值爲空的問題

添加一個option <option value="" selected hidden></option>