語法如下:
在2row之間加上一個clearfix,只顯示在sm跟xs底下
Matt 發表在 痞客邦 留言(0) 人氣(36)

步驟1 登入Google developers Console
Create New Project
Matt 發表在 痞客邦 留言(0) 人氣(422)
在Chrome、Firefox等號稱將Javascript優化過的瀏覽器會發生一個情形
原本的array =>
array("1011" => "Matt","1000" => "susan","1033" => "kevin");
經過JSON_encode輸出,理論上應該會變成
Matt 發表在 痞客邦 留言(0) 人氣(70)
javascript 裡要削去字串空白可以使用trim,ltrim,rtrim
在IE上使用javascript的function trim()會發生錯誤,可以加上此段讓IE正常
if(typeof String.prototype.trim !== 'function') {
String.prototype.trim = function() {
return this.replace(/^\s+|\s+$/g,"");
}
}
if(typeof String.prototype.ltrim !== 'function') {
String.prototype.ltrim = function() {
return this.replace(/^\s+/,"");
}
}
if(typeof String.prototype.rtrim !== 'function') {
String.prototype.rtrim = function() {
return this.replace(/\s+$/,"");
}
}
Matt 發表在 痞客邦 留言(0) 人氣(77)