2018-10-23
2018-10-23 本文已影响0人
深度_1175
that.data.opinion = that.data.opinion.replace(/^\s+|\s+$/gm, '');
trim
过滤数字
var mobile = e.detail.value.replace(/[^\d]/g, '')
工厂方法
<view class="container">
<view class="divLine"></view>
</view>
test.wxss
/* 横着的分割View样式 /
/分割线样式*/
.divLine{
background: #E0E3DA;
width: 100%;
height: 5rpx;
}
。
exit
match 是字符串方法,找不到返回null
window.location.href = document.referrer;(返回刷新)
防止被撑开
table {
table-layout: fixed;
word-break: break-all;
}
div {
table-layout: fixed;
word-wrap: break-word;
width: 加上宽度;
overflow: hidden; (让多出来的不显示。)
}
贪婪(默认)与非贪婪模式(*?,问号)
.任意字符,不含换行
no-shrink (85 115)(拉伸效果)