HTML页面内容禁止选择、复制、右键

时间:2022-11-06 23:33:04

http://blog.sina.com.cn/s/blog_5f289d580100f4c9.html


  1. <body leftmargin=0 topmargin=0  oncontextmenu='return false' ondragstart='return false' onselectstart ='return false' onselect='document.selection.empty()' oncopy='document.selection.empty()' onbeforecopy='return false' onmouseup='document.selection.empty()'>  
关键就在
  1. oncontextmenu='return false'  
  2. ondragstart='return false'   
  3. onselectstart ='return false'   
  4. onselect='document.selection.empty()'   
  5. oncopy='document.selection.empty()'   
  6. onbeforecopy='return false'   
  7. onmouseup='document.selection.empty()'