美文网首页
2018-10-23

2018-10-23

作者: 深度_1175 | 来源:发表于2018-10-23 10:25 被阅读0次

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)(拉伸效果)

相关文章

网友评论

      本文标题:2018-10-23

      本文链接:https://www.haomeiwen.com/subject/louozftx.html