摘要:
replace方法是属于String对象的,可用于替换字符串。简单介绍:StringObject.replace(searchValue,replaceValue)StringObject:字符串searchValue:字符串或正则表达式replaceValue:字符串或者函数字符串替换字符串'I am loser!'.replace('loser','hero')//I am hero!直接使用字符串能让自己从loser变成hero,但是如果有2个loser就不能一起变成hero了。'I am loser,You are loser 阅读全文
摘要:
Due to a number of requests, I'm writing a detail tutorial on how to create an animated scroll to top as seen on Web Designer Wall. It is very simple to do with jQuery (just a few lines of code). It checks if the scrollbar top position is greater than certain value, then fade in the scroll to to 阅读全文