Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Java by (13.1k points)
I was trying to set a name attribute using a "." dot notation but it doesn't work whereas it is working if I use .setAttribute().

Can anyone help me with this?

1 Answer

0 votes
by (26.7k points)

Basically, when using a .name attribute, you are not mentioning the element type. For the name attribute to work, it should be present in the input element. So, it will work for setAttribute and not for .name attribute.

I hope this will help.

Want to become a Java Expert? Join Java Certification now!!

Want to know more about Java? Watch this video on Java Tutorial for Beginners | Java Programming:

Related questions

Browse Categories

...