Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/01/2021 in all areas

  1. It is impossible to protect HTML code, but I will do what you asked. Here is the above code without password: <html> <head><title>Encryptor</title></head> <body> <div id="thecode" style="display:none"> &lt;script&gt; document.write(unescape("thecode")); &lt;/script&gt; &lt;noscript&gt;JavaScript must be enabled in your browse in order to see protected page.&lt;/noscript&gt; </div> <script> function do_encode() { orig = document.getElementById("as1").value; thecode1 = document.getElementById("thecode").innerHTML; thecode1 = thecode1.replace(/&lt;/g,'<'); thecode1 = thecode1.replace(/&gt;/g,'>'); thecode1 = thecode1.replace(/&amp;/g,'&'); orig1 = thecode1.replace(/thecode/,escape(orig)); document.getElementById("as2").value = orig1; } </script> <b>Enter your HTML code to be encrypted:<br></b> <textarea id="as1" rows="10" cols="50"></textarea><br> <button onclick="do_encode()">Click Here to Encrypt and Password Protect Your HTML</button><br> <br> This is your protected HTML page text. Save this text as an HTML file:<br> <textarea id="as2" rows="10" cols="50"></textarea> </body> </html>
    1 point
  2. You will need to clarify exactly what you want.
    1 point
  3. Actually, to remove the password from the generated HTML, just cut out everything and only keep these lines: <script language="JavaScript1.2"> orig = unescape( /* ... ... ... ... */ ); orig1 = orig1.replace(/mmm/g,"\r\n"); document.write(orig1); </script> <noscript>JavaScript must be enabled in your browse in order to see protected page.</noscript>
    1 point
  4. orig_pass = prompt("Please enter password",""); To remove the password prompt, just replace the above line with whichever fixed value you want. orig_pass = "XYZ"; This code is not very good, the variables aren't properly declared and they're using outdated attributes. If you're intending to hide your source code from people, I will have to warn you that it is impossible. If the browser is able to read the source code then so can anybody.
    1 point
  5. Greetings My forum status just got approved. I have some knowledge of HTML, CCS, JavaScript, Java and C++. I'm on this site to kept up with my knowledge of Web development and maybe learn some new things. I'm from the Midwest of USA and right now its freezing here!!
    1 point
×
×
  • Create New...