---
title: "禁止选中web页面内容"
author: "rabby"
date: "2010-12-31T13:21:39Z"
tags: []
categories: ["Web前端"]
slug: "web"
draft: false
lastmod: "2010-12-31T13:22:00Z"
id: 856796
url: "https://rabby.iteye.com/blog/856796"
---

```
<body  unselectable="on" onselectstart="return false;" style="-moz-user-select:none;">
       <h1>不能被选中</h1>
</body>
```

 

 

 

```
<body oncontextmenu='return false' ondragstart='return false' onselectstart ='return false' onselect='document.selection.empty()' oncopy='document.selection.empty()' onbeforecopy='return false' onmouseup='document.selection.empty()'>
	<h1>不能被选中</h1>
</body>
```