![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
jquery
风情雨
敲不完的代码。。。
展开
-
jquery mobile 跳转问题
引用jquery mobile 后发现点击无法跳转页面,js和css都失效; 解决方法: 1:在a标签里添加属性 data-ajax="false" 或 rel="external" 2:将当前页面需要用到的css以及js放在div内原创 2017-08-23 18:16:22 · 415 阅读 · 0 评论 -
获取浏览器屏幕宽度和高度
js: document.documentElement.clientWidth; document.documentElement.clientHeight; window.innerWidth window.innerHeight jq: $(window).height(); //浏览器当前窗口可视区域高度 $(document).height();原创 2017-08-25 20:39:34 · 424 阅读 · 0 评论 -
textarea输入框随内容撑开高度
方法一(jquery):$('textarea').each(function () { this.setAttribute('style', 'height:' + (this.scrollHeight) + 'px;overflow-y:hidden;');}).on('input', function () { this.style.height = 'auto'; this.styl...原创 2018-05-26 18:53:25 · 6523 阅读 · 0 评论