Tuesday, July 20, 2010, 08:53 AM - HTML, JavaScript

var inputs = $$("input"); console.log("Before: " + inputs.length) for(i = 0; i<inputs.length; i++) { try{ if(inputs.getAttribute("type") == "hidden"){ inputs.parentNode.removeChild(inputs); } }catch(e){ console.log(e); } } inputs = $$("input"); console.log("Afterwards: " + inputs.length) for(i = 0; i<inputs.length; i++) { try{ inputs.parentNode.innerHTML = inputs.getAttribute("value"); } catch(e){ console.log(e); } }
http://getfirebug.com/
http://getfirefox.com
EDIT:
I made two mistakes within the markup the '<' was interpreted as an beginning HTML-tag, so it messed up the Javascript Code.
| permalink