正确的两种写法:
一、HTML中
<input type="text"
className="lg-input-o"
autoComplete="off"
placeholder=""
onClick={e => this.getInput("1")}
value={startDate}
readOnly
/>
二、CSS中
.sendpayApproval .table .table-row2 .time .lg-input-o[readonly] {
cursor: pointer;
}
错误写法:
readonly
readonly=”readonly”