標籤

more tags...

最新回覆

[ASP.NET]利用oncontextmenu與onSelectStart防止網頁按右鍵與選取

最近剛好有一個這樣的需求,這個需求不是在防止別人偷看原始碼..

要防止IE按右鍵與選取最簡單的方法就是在Body加入下列語法

也可以用asp.net程式動態加入這些語法
asp.net(c#)
Default.aspx

Default.aspx.cs

 執行結果:

推到 Twitter!
推到 Plurk!


 

2009/10/13 15:00| 閱讀數 : 1430 | 1 人推薦 我要推薦 | 2 Comments | 文章分類 : ASP.NET 訂閱


回覆

# re: [ASP.NET]利用oncontextmenu與onSelectStart防止網頁按右鍵與選取, Posted by kennyshu on 2009/10/14 上午 03:09  回覆

我發現在IE7下如果你的畫面右方有Scroll Bar,你把滑鼠移到Scroll Bar的左邊邊界並且超出一點點,按下右鍵還是可以叫出menu

# re: [ASP.NET]利用oncontextmenu與onSelectStart防止網頁按右鍵與選取, Posted by puma on 2009/10/14 上午 09:21  回覆

to Kennyshu,

厲害,這樣也可以找出破解方法...

發表回覆

標題: *
姓名: *
Email: (將不會被顯示)
Url:
回覆: *
登入後使用進階評論
Please add 4 and 8 and type the answer here:
F6 Team logo


用BloggerAds 替自已加薪

每月文章

文章分類

推薦討論區

推薦部落格