textarea's “required” attribute doesn't work even though the value is empty

前端 未结 6 1569
不知归路
不知归路 2020-12-29 21:21

I created a simple page with list box and text area with conditions that all should be required.

List box are working fine, but textarea box doesn\'t tell that the f

6条回答
  •  梦谈多话
    2020-12-29 21:55

    I faced similar problem. I left space between opening and closing tag of Textarea as in following code

    
    
    
     ...
    
    

    and in my javascript I was trying following

    
    

    And I could not figure out what was the problem until I landed on this page. It was the space. Thanks @sinisake for the solution. Hope sharing my experience would help someone

提交回复
热议问题