Skip to main content

Mencegah klik kanan dengan java script


Setelah kemarin membuat  fungsi  klik kanan tidak berfungsi. Sekarang saya akan kasih tau caranya, bagi yang sudah tahu gak usah baca :D. Cara ini sudah banyak yang tahu dan basi. Mematikan klik kanan biasaya bertujuan agar isi konten kita tidak di copy paste orang.
Cara mendiseble klik kanan biasanya menggunakan javascript. Langsung aja yah silakan ketik script di bawah ini :
<script language="JavaScript" type="text/javascript">
var message="Gak Bisa Kllik Kanan ya... hihihi Baca Solusi Tidak Bisa Klik Kanan";
function clickIE4(){
if (event.button==2){
alert(message);
return false;}}
function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;}}}
if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;}
document.oncontextmenu=new Function("alert(message);return false")
</script>

ketikan di dalam kode html anda Maka fungsi klik kanak akan mati. Sekarang cara mendiseble fungsi select all ( Ctrl+A ). Silakan ketik script ini di bawah script tadi :
<script type="text/javascript">
function disableSelection(target){
if (typeof target.onselectstart!="undefined") //IE route
 target.onselectstart=function(){return false}
else if (typeof target.style.MozUserSelect!="undefined") //Firefox route
 target.style.MozUserSelect="none"
else //All other route (ie: Opera)
 target.onmousedown=function(){return false}
target.style.cursor = "default"
}

//Sample usages
//disableSelection(document.body) //Disable text selection on entire body
//disableSelection(document.getElementById("mydiv")) //Disable text selection on element with id="mydiv"
</script>
<script type="text/javascript">
disableSelection(document.body) //disable text selection on entire body of page
</script>

<script type="text/javascript">
var somediv=document.getElementById("mydiv")
disableSelection(somediv) //disable text selection within DIV with id="mydiv"
</script>

<script type="text/javascript">
var alltables=document.getElementsByTagName("table")
for (var i=0; i<alltables.length; i++)
disableSelection(alltables[i]) //disable text selection within all tables on the page
</script>

Sekarang fungsi klik kanan dan Select all sudah di diseble. Tapi cara ini sebenarnya masih kurang efektif. Ada cara yang lebih efektif tapi cukup ektrim. Lain kali saya akan membahasnya deh.mudh bukan?? Semoga bermanfaat.

Popular posts from this blog

Profile Biodata Foto Renie Arumsari

Biodata Renie Arumsari Nama Lengkap : Agustina Renie Arum Sari Nama Lain : Renie Arumsari Asal : Yogyakarta Kebangsaan : Indonesia Pekerjaan : Aktris, Model, MC Twitter : https://twitter.com/rerenie Instagram : https://www.instagram.com/renieas Prestasi Renie Arumsari Putri Pariwisata Indonesia DIY 2017 Putri Pariwisata Indonesia Best National Costume Putri Pariwisata Indonesia Putri Bunga Miss Tea Indonesia 2017 Miss Jogjatronik Sahabat Larissa Puteri Bandara 2013 Duta Bandara Adisutjipto Sinetron Renie Arumsari 2018 – Orang Ketiga, sebagai Kartika – SCTV Sitkom : 2015 – Kos-kosan Jogja, sebagai Gendhis View this post on Instagram A post shared by Renie Arumsari (@renieas) on Jun 21, 2019 at 10:03pm PDT View this post on Instagram A post shared by Renie Arumsari (@renieas) on May 30, 2019 at 2:47am PDT ...

Read Solo Leveling Chapter 103 English Translate

Read Manhwa Solo Leveling Chapter 103 English translation . Since a portal connecting our world to a world full of monsters and creatures of all kinds appeared, some people have acquired powers and the ability to hunt them: they are called hunters. The protagonist of the story, Sung Jin-Woo, is the weakest of the rank E hunters and barely stronger than a normal human. He is nicknamed by his fellow hunters as "the weakest". One day, he and other hunters find themselves trapped in an extremely dangerous dungeon, and only a few of them survive and manage to escape. Sung Jin-Woo himself hardly survives and is the only who completes all the trials in this dungeon. He then turns into a "player" who can now see an interface showing him quests. Will he succeed in becoming the most powerful hunter? Read Solo Leveling Chapter 103 Not released yet release date : January 2020 You may also like : Manhwa similiar to solo leveling Read solo leveling 103 s...

Read Manga Solo leveling 104 English Translation

Solo Leveling is a Korean novel manhwa written by Chu-Gong, It was serialized in Papyrus and later in KakaoPage and concluded with 14 volumes and 270 chapters. In April 13, 2018, a webtoon serialization started in Korean mobile site KakaoPage drawn by artists Hyeon - Gun and Jang Sung-Rak. Read Manhwa Manga Solo Leveling 104 capitulo 104 Kyoukai tells Ten to move so she can save Shin. Banyou starts yelling at the HSU for not chasing Riboku but Mouten and Ouhon can read the situation and they head where the soldiers are gathered. Ten asks what Kyoukai's going to do and she says that she knows of a 1000 year old technique that shares life forces but she hasn't tried it before and has never seen it actually work. But she says there's no other way. Flashback: Kyoukai is attempting this technique on a dead bird and Kyoushou asks her why she's trying such a dangerous technique. She says that since it's a technique that tries to bring the dead back t...