<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
<style>
*{ margin:0; top:0}
.pop{ height:200px; width:200px; background:red; position:absolute;}
h4{ line-height:40px; height:40px; background:#4A1D1D; color:#fff; cursor:move}
</style>
<script>
window.οnlοad=function(){
var oDiv1=document.getElementById('box1');
var oDiv2=document.getElementById('box2');
var title=oDiv1.getElementsByTagName('h4')[0];
drag(oDiv1,title); //我们会发现oDiv1里面的内容能够被选中
drag(oDiv2); //oDiv2里面的内容不能被选中
};
</script>
</head>
<body>
<div id="box1" class="pop">
<h4>标题</h4>
dsf sdf sadf sadf sadf adsf sad fas df safd ad fa fd asd asdf
</div>
<div id="box2" class="pop">
<h4>标标题标题标题题</h4>
dsf sdf sadf sadf sadf adsf sad fas df safd ad fa fd asd asdf
</div>
</body>
</html>