I want to hide form code from view code/inspect element browser , how can i do that ?
This is my code, please see below:
<div style=" text-align: center; padding: 300px; font-family: lato; "> Please wait redirect page ......<br> <img src="http://maps.nrel.gov/sites/all/modules/custom_modules/hydra/assets/images/loading_bar.gif" border="0"> </div> <form name="f1" action="payments.php" method="post"> <input type="hidden" name="id_crad" value="..."> <input type="hidden" name="currency_code" value="USD"> <input type="hidden" name="amount" value="12.99"> </form> <script type="text/javascript"> setTimeout(function(){f1.submit();}, 3000); </script>
Please see picture
We can hide an element by inspecting it with Chrome DevTools, right-clicking the element under the Elements tab, and choosing the Hide element menu from the context menu. If you're a fan of using the shortcut, then pressing the <kbd>h</kbd> key has the same effect.
After encrypting it, you can just write a basic HTML page just putting into the <head> tag once again the script to disable the right click, into the <body> tag you code and hide everything just writing at top of the page <html hidden> .
To create hidden comments in HTML, add <! --- tag and end it with -- >. Whatever comes inside it is hidden.
You simply can't.
Code inspectors are designed for debugging HTML and JavaScript. They do so by showing the live DOM object of the web page. That means it reveals HTML code of everything you see on the page, even if they're generated by JavaScript. Some inspectors even shows the code inside Iframes.
There are some JavaScript tricks to disable some keyboard, mouse interaction on the page. But there always are work around to those tricks. For instance, you can use the browser top menu to enable DOM inspector without a problem.
Try theses:
They are outside the control of JavaScript.
Think about this:
Basically, browsers are god to your JavaScript. And they want to grant the web developer super power with code inspectors. Even if your trick works for a while, the browsers would want to undo it in the future.
You're waging war against god and you're doomed to fail.
To put it simple, if you do not want people to get something in their browser, you should never send it to their browser in the first place.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With