Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

11 Commits

Repository files navigation

Tips-Js How To 💡

Disable right click on my web page, Disable view source, Disable developer tools

<scriptlanguage="javascript">
window.oncontextmenu = function () {returnfalse;};
document.onkeydown = function(e){if(event.keyCode==123){returnfalse;} if(e.ctrlKey &&e.shiftKey&&e.keyCode=='I'.charCodeAt(0)){returnfalse;}if(e.ctrlKey&&e.shiftKey&&e.keyCode=='J'.charCodeAt(0)){returnfalse;}if(e.ctrlKey&&e.keyCode=='U'.charCodeAt(0)){returnfalse;}}
</script>

Automatically Refresh DOM HTML

<divid="re"></div><scripttype="text/javascript">setInterval(function(){$('#re').load(document.URL+' #re');//Refresh 1 second},1000)</script>

Get Variable Javascript to Form HTML

<formaction=""><inputtype="hidden"id="getNum"name="dataNum"><inputtype="hidden"id="getString"name="dataString"></form><scripttype="text/javascript">
var num = 100;
var str = 'hello';
$(document).ready(function() {document.getElementById("getNum").value=num;document.getElementById("getString").value=str;});
</script>

Get Variable Form Select Html with JQuery

<selectid="inputSelect"name="carlist"><optionvalue="1">Volvo</option><optionvalue="2">Saab</option><optionvalue="3">Opel</option><optionvalue="4">Audi</option></select><scripttype="text/javascript">$(document).ready(function(){vargetDataSelect=$('#inputSelect').find(":selected").val();});</script>

About

💡 JavaScript HTML JQuery tips

Topics

Resources

Stars

2 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors