I'm using JS and want to do a string replace of an entire HTML page. I've tried:
var swapIn = 'value="teststring"';
var myOldString = (document.querySelectorAll('html')[0].outerHTML);
var myNewString = myOldString.replace(/value="[^"]*"/g, swapIn);
document = myNewString;
The switch is not occurring, How can I fix this?