JavaScript Disable Text Selection on Webpage When Drag-and-Drop
JavaScript Disable Text Selection on Webpage When Drag-and-Drop เป็นตัวอย่างการ JavaScript กับ Disable Text Selectionป้องกันการ Select เลือก หรือ Drag เลือกข้อความในหน้า Web Page
disable_text_selection.html
<html>
<head>
<title>ThaiCreate.Com Tutorial</title>
</head>
<body>
<form name="frmMain" action="" method="post">
<script language="JavaScript">
window.onload = function() {
document.onselectstart = function() {return false;} // for ie
document.onmousedown = function() {return false;} // for mozilla
}
</script>
Disable Text Selection Disable Text Selection Disable Text Selection <br>
Disable Text Selection Disable Text Selection Disable Text Selection <br>
Disable Text Selection Disable Text Selection Disable Text Selection <br>
Disable Text Selection Disable Text Selection Disable Text Selection <br>
</form>
</body>
</html>