为了账号安全,请及时绑定邮箱和手机立即绑定

react如何设置input的maxlength等属性?

react如何设置input的maxlength等属性?

宝慕林4294392 2018-08-08 10:08:50
是不支持这些属性吗,还是要特殊处理,要怎样才能添加上?
查看完整描述

2 回答

?
回首忆惘然

TA贡献1847条经验 获得超11个赞

大写L

<input type = "text" maxLength = "4" />


查看完整回答
反对 回复 2018-08-30
?
holdtom

TA贡献1805条经验 获得超10个赞

maxLength

accept acceptCharset accessKey action allowFullScreen allowTransparency alt

async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge

charSet checked cite classID className colSpan cols content contentEditable

contextMenu controls coords crossOrigin data dateTime default defer dir

disabled download draggable encType form formAction formEncType formMethod

formNoValidate formTarget frameBorder headers height hidden high href hrefLang

htmlFor httpEquiv icon id inputMode integrity is keyParams keyType kind label

lang list loop low manifest marginHeight marginWidth max maxLength media

mediaGroup method min minLength multiple muted name noValidate nonce open

optimum pattern placeholder poster preload profile radioGroup readOnly rel

required reversed role rowSpan rows sandbox scope scoped scrolling seamless

selected shape size sizes span spellCheck src srcDoc srcLang srcSet start step

style summary tabIndex target title type useMap value width wmode wrap


查看完整回答
反对 回复 2018-08-30
  • 2 回答
  • 0 关注
  • 2600 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信