Skip to content

Instantly share code, notes, and snippets.

@rentzsch
Created February 17, 2010 00:47
Show Gist options
  • Save rentzsch/306140 to your computer and use it in GitHub Desktop.
Save rentzsch/306140 to your computer and use it in GitHub Desktop.
var bustedInput = document.getElementsByTagName('zinput')[0];
var fixedInput = document.createElement('input');
for (var attrIndex = 0; attrIndex < bustedInput.attributes.length; attrIndex++) {
var attrName = bustedInput.attributes[attrIndex].nodeName;
var attrValue = bustedInput.getAttribute(attrName);
fixedInput.setAttribute(attrName, attrValue);
}
bustedInput.parentElement.appendChild(fixedInput);
bustedInput.parentElement.removeChild(bustedInput);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment