Is there a way in java script to get only a particular name instead of using document.getElementsByName(\"x\"); which return an array? I have a kind of special
document.getElementsByName(\"x\");
If you're looking for a single element, take the first one from the nodelist, for example:
var element = document.getElementsByName("x")[0];
You can test it out here.