how to get value of input box without id and name field using javascript

后端 未结 5 1937
耶瑟儿~
耶瑟儿~ 2021-01-20 09:35

I have a form with 3 input box and all the input box does not have id, name field in it. So if i enter value in it, How can i check the value of input box without id and nam

5条回答
  •  余生分开走
    2021-01-20 10:17

    It looks like you want to do form validation. For form validation in HTML5, check this resource out: http://www.the-art-of-web.com/html/html5-form-validation/

    Basically, you will be able to get by with some validations just by using HTML attributes, and without using JavaScript.

提交回复
热议问题