猿问

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

是不支持这些属性吗,还是要特殊处理,要怎样才能添加上?

宝慕林4294392
浏览 2601回答 2
2回答

回首忆惘然

大写L<input&nbsp;type&nbsp;=&nbsp;"text"&nbsp;maxLength&nbsp;=&nbsp;"4"&nbsp;/>

holdtom

maxLengthaccept acceptCharset accessKey action allowFullScreen allowTransparency altasync autoComplete autoFocus autoPlay capture cellPadding cellSpacing challengecharSet checked cite classID className colSpan cols content contentEditablecontextMenu controls coords crossOrigin data dateTime default defer dirdisabled download draggable encType form formAction formEncType formMethodformNoValidate formTarget frameBorder headers height hidden high href hrefLanghtmlFor httpEquiv icon id inputMode integrity is keyParams keyType kind labellang list loop low manifest marginHeight marginWidth max maxLength mediamediaGroup method min minLength multiple muted name noValidate nonce openoptimum pattern placeholder poster preload profile radioGroup readOnly relrequired reversed role rowSpan rows sandbox scope scoped scrolling seamlessselected shape size sizes span spellCheck src srcDoc srcLang srcSet start stepstyle summary tabIndex target title type useMap value width wmode wrap
随时随地看视频慕课网APP
我要回答