Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangyonghong committed Dec 30, 2015
1 parent 6b894a8 commit 7e508b7
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions js.md
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,17 @@ window.onerror = function (errMsg, scriptURI, lineNumber, columnNumber, errorObj
};
```

- [如何通过 js 修改微信浏览器的title?](https://www.zhihu.com/question/26228251/answer/32405529)
```javascript
var $body = $('body');
document.title = 'title'; // hack在微信等webview中无法修改document.title的情况
var $iframe = $('<iframe src="/favicon.ico"></iframe>').on('load', function(){
setTimeout(function(){
$iframe.off('load').remove()
}, 0)
}).appendTo($body)
```

#### 1. 常用方法 - js
- 字符串长度截取
```js
Expand Down

0 comments on commit 7e508b7

Please sign in to comment.