非凡少年 的动态
动态详情
返回列表
非
非凡少年
公开
How to use React label element?
If you try to render a<label> element bound to a text input using the standard for attribute, then it produces HTML missing that attribute and prints a warning to the console.
1<label for={'user'}>{'User'}</label>
2<input type={'text'} id={'user'} />for is a reserved keyword in JavaScript, use htmlFor instead.
1<label htmlFor={'user'}>{'User'}</label>
2<input type={'text'} id={'user'} />浏览:270点赞:0