<!doctype html>
<html lang="en"> 
    <body>
        <form id="theform" method="post" action="form.php">
            username: <input type="text" name="username"><br/>
            password: <input type="password" name="password"><br/>
            <input type="submit" name="go" value="login">
        </form>
        
    <br><br><hr>
    <pre id="page_source"></div>
    <script src="../vendor/jsencrypt.min.js"></script>
    <script src="../vendor/aes.js"></script>
    <script src="../js/javascrypt.js"></script>
    <script>
        var j = new javascrypt('javascrypt.php?m=pubkey','javascrypt.php?m=aes');
        j.onsecure(function()
        {
            j.encryptform('#theform');
            j.post('ajax.php',j.enc(JSON.stringify({name: 'value'})));
        });
    </script>
    <script>
        j.get('',function(data) {
            document.querySelector('#page_source').innerText = data ;
        });    
    </script>
    </body>
</html>

<!doctype html>
<html lang="en"> 
    <body>
        <form id="theform" method="post" action="form.php">
            username: <input type="text" name="username"><br/>
            password: <input type="password" name="password"><br/>
            <input type="submit" name="go" value="login">
        </form>
    <br><br><hr>
    <pre id="page_source"></div>
    <script src="../vendor/jsencrypt.min.js"></script>
    <script src="../vendor/aes.js"></script>
    <script src="../js/javascrypt.js"></script>
    <script>
        var j = new javascrypt('javascrypt.php?m=pubkey','javascrypt.php?m=aes');
        j.onsecure(function()
        {
            j.encryptform('#theform');
            j.post('ajax.php',j.enc(JSON.stringify({name: 'value'})));
        });
    </script>
    <script>
        j.get(window.location,function(data) {
            document.querySelector('#page_source').textContent = data;
        });    
    </script>
    </body>
</html>

Update to textContent vs innerTEXT
Update to textContent vs innerTEXT
