Posts

Showing posts with the label Java Script

Disable Text Selection In Web Page Using java script

Image
To Disable Text Selection it takes only Two steps:- Make a HTML file and define markup for webpage Write Java Script Block In Html file. Step 1.Make a HTML file and define markup for web page We make a HTML file and save it with a name  Index.html <!DOCTYPE html> <html> <head> < link rel = "stylesheet" type = "text/css" href = "disable.css" > </head> <body> < h1 > Disable Text Selection In Website Using CSS < /h1 > < p class = "select" > Select The Text In This Paragraph This Is Selectable Like Any Other Text < /p > < p class = "no_select" > Try To Select This Text You Are Not Able To Select This Text In Modern Browsers < /p > </body> </html> Step 2. Write java script into script Block in Html or Web Page. Disable context menu with jQuery $ ( document ). on ( "contextmenu" , function ( even

Block inspect element in your website

Introduction It is not really possible to completely block  inspect element on your website. But you can block some popular ways of accessing it. some of them include Right Click F12 Ctrl + Shift + I Ctrl + Shift + J Ctrl + Shift + C Ctrl + U What you need Basic JavaScript knowledge HTML editor I tested with Chrome browser & fire foz. It's working for my requirement. Right Click `<body oncontextmenu="return false;">` Keys document . onkeydown = function ( e ) { if ( event . keyCode == 123 ) { return false ; } if ( e . ctrlKey && e . shiftKey && e . keyCode == 'I' . charCodeAt ( 0 )) { return false ; } if ( e . ctrlKey && e . shiftKey && e . keyCode == 'C' . charCodeAt ( 0 )) { return false ; } if ( e . ctrlKey && e . shiftKey && e . keyCode == 'J' . charCodeAt ( 0 )) { return fa

Create Pagination using Java script Using C#

Html Design Code <! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> < html xmlns ="http://www.w3.org/1999/xhtml"> < head runat ="server">     < title ></ title >     < script src ="Script/jquery-2.1.1.min.js" type ="text/javascript"></ script >     < script src ="Script/JSPaging.js" type ="text/javascript"></ script >     < link href ="Style/Style.css" rel ="stylesheet" type ="text/css" /> </ head > < body >     < form id ="form1" runat ="server">     < asp : HiddenField ID ="hdnStartingIndex" ClientIDMode ="Static" runat ="server" />     < asp : HiddenField ID ="hdnEndingIndex" ClientIDMode ="Static" r