Browser does not support form.all method

more than ten years ago, the system only supported ie, and the form.all ("itemname") method was widely used in the form processing. As a result, it is impossible to run
on mainstream browsers other than IE. Is there any other way to directly rewrite the form.all method besides changing it to form ["itemname"] one by one? For example, introduce a common js file and override the form.all method in the js file?
Thank you!

Jun.12,2022

DEMO , you can look at it in chrome and ie, and it looks like you're done looking up all the tags. form.all = = form.getElementsByTagName ('*') . But you pass in itemname as a method. After testing, it is found that both id and name can be found and changed to

.
if(form.all === undefined){
    form.all = function(name){
        return form[name]
    }
}

< hr >

Update-17:46:15 on February 12, 2019
you can see that form.__proto__ is HTMLFormElement , and you can modify this HTMLFormElement.prototype directly. HTMLFormElement.prototype===form.__proto__ got it. You can read

in the demo above.

clipboard.png

clipboard.png

clipboard.png

< hr >
var _form = document.createElement('form')
if(!_form.__proto__.all){
  _form.__proto__.all = function(name){
      return this[name]
  }
}
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bf4672-31eed.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bf4672-31eed.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?