var path = require('path');
var nwPath = process.execPath;
var nwDir = path.dirname(nwPath);
$("a").each(function(){
var $this = $(this);
$this.attr('href', $this.attr('href').replace("LMI=100", "LMI=300"));
});
<HTML>
<body>
<script>
function onload() {
test = document.querySelector('#text');
alert(test);
}
document.addEventListener("DOMContentLoaded", onload);
</script>
<p id="text">testing</p>
</body>
</html>