在网页中模拟控件的设计器:
很简单的几句代码,如下:
Code
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>控件的编辑状态</title>
<script language="javascript">
function onload() {
document.execCommand("2D-Position", true, true);
document.execCommand("MultipleSelection", true, true);
}
</script>
</head>
<body onload="onload()">
<div id="SKbillsheet" contenteditable="true">
<button id="button1" style="left: 5px; 100px; position: absolute; top: 5px;
height: 30px">
button1
</button>
</div>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>控件的编辑状态</title>
<script language="javascript">
function onload() {
document.execCommand("2D-Position", true, true);
document.execCommand("MultipleSelection", true, true);
}
</script>
</head>
<body onload="onload()">
<div id="SKbillsheet" contenteditable="true">
<button id="button1" style="left: 5px; 100px; position: absolute; top: 5px;
height: 30px">
button1
</button>
</div>
</body>
</html>