How to use 'document getelementsbyname value' in JavaScript

Every line of 'document getelementsbyname value' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
this disclaimer
4112function getElementsByName(
4113 doc,
4114 name
4115 )
4116 {
4117 /*
4118 Public wrapper method for
4119 `getElementsByName`; returns
4120 `null` if not applicable.
4121 */
4122 var isDoc = Utils.is.document(doc),
4123 key = "getElementsByName",
4124 canUse,
4125 result = null;
4126 if (isDoc) {
4127 canUse = Utils.is.hostObject(
4128 doc[key]
4129 );
4130 if (canUse) {
4131 result = makeLinearArray(
4132 doc[key](name)
4133 );
4134 }
4135 }
4136 return result;
4137 }
Important

Use secure code every time

Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code

72value(selector) {
73 return this.queryValue(this.formatSelector(selector));
74}

Related snippets