87,990
社区成员
发帖
与我相关
我的任务
分享
<script type= "text/javascript " >
String.prototype.stripHTML =function() {varreTag = / <(?:.|\s)*? >/g;returnthis.replace(reTag, " ");
}
varsTest = " <b >this would be bold </b > ";
alert(sTest.stripHTML());
</script >
<body >
</body >
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="zh-cn">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="ie=edge"/>
</head>
<style>
/* 浮动列表==================================================== */
tr>td>div>ul{
position: fixed;
top: 0px;
left: 0px;
}
/* 列表样式=================================================== */
*{ margin:0px; padding:0px; font-size:22px; }
#menu{ width:160px; border:1px solid #ccc;}
#menu ul{ list-style:none;}
#menu ul li{ height:28px; line-height:28px; background:#FFCCFF; border-bottom:1px solid #333333; padding:0px 8px;position:relative;}
#menu ul li:hover ul{ display:block;}
#menu ul li ul{ display:none;position: absolute; left: 100px; top: 0px;width:100px; border:1px solid #ccc; border-bottom:none;}
a{color: #000000;text-decoration: none;}
a:hover{ color:blue;background:red;}
/* a:hover{ color:#00FFFF;} */
#第一列{
text-align:center
}
#第二列{
text-align:right
}
#第三列{
text-indent:40px
}
#第四列{
text-indent:40px
}
#第五列{
text-indent:40px
}
div{
max-width:1000px;
width:auto;
min-height:20px;
padding:3px;
line-height:30px;
word-wrap:break-word;
overflow-x:hidden;
overflow-y:auto;
font-family:仿宋;
color:blue;
font-size:20px;
margin:2px auto;
}
.border{
border: 1px solid #FF0000;
}
/* 列表项背景色跟随焦点div变化==================================== */
.listyle{
background-color:blue;
width:100px;
}
/* =============================================================== */
</style>
<body>
<table border=1 width="100%">
<tr>
<td width="160px"
bgcolor="skyblue"
valign="top"
line-height:20px;
>
<div id="menu">
<ul>
<li><a href="2.html#第一列">第一列</a></li>
<li><a href="2.html#第二列">第二列</a></li>
<li><a href="2.html#第三列">第三列</a></li>
<li><a href="2.html#第四列">第四列</a></li>
<li><a href="2.html#第五列">第五列</a></li>
</ul>
</td><td>
<div ID="第一列" contenteditable="true" onblur="setBlur(this,'第一列-表A-窗口A')" onfocus="setFocus(this,'第一列-表A');">绑定表A第一列</div>
<div ID="第二列" contenteditable="true" onblur="setBlur(this,'第二列-表A-窗口A')" onfocus="setFocus(this,'第二列-表A');">绑定表A第二列</div>
<div ID="第三列" contenteditable="true" onblur="setBlur(this,'第三列-表A-窗口A')" onfocus="setFocus(this,'第三列-表A');">绑定表A第三列</div>
<div ID="第四列" contenteditable="true" onblur="setBlur(this,'第四列-表A-窗口A')" onfocus="setFocus(this,'第四列-表A');">绑定表A第四列</div>
<div ID="第五列" contenteditable="true" onblur="setBlur(this,'第五列-表A-窗口A')" onfocus="setFocus(this,'第五列-表A');">绑定表A第五列</div>
</td></tr></table>
</body>
<script>
/* 列表项背景色跟随焦点div变化============================================ */
function setClick(num){
var theNumber=parseInt(num)-1;
var liList=document.getElementsByTagName("li");
var listLength=liList.length;
for(var i=0;i<listLength;i++){
liList[i].className="";
}
liList[theNumber].className="listyle";
}
/* ======================================================================== */
function setFocus(obj,str2) {
obj.setAttribute("class", "border");
window.external.setPosition(str2);
}
function setBlur(obj, str2) {
obj.setAttribute("class", "");
window.external.setCurrentValue(obj.innerHTML, str2);
}
function init(s1, s2, s3, s4, s5) {
document.getElementById("第一列").innerHTML = s1.replace(/\r\n/g,"<p>");
document.getElementById("第二列").innerHTML = s2.replace(/\r\n/g,"<p>");
document.getElementById("第三列").innerHTML = s3.replace(/\r\n/g,"<p>");
document.getElementById("第四列").innerHTML = s4.replace(/\r\n/g,"<p>");
document.getElementById("第五列").innerHTML = s5.replace(/\r\n/g,"<p>");
}
function setElementFocus(name) {
var obj = document.getElementById(name);
if(obj != null) {
obj.focus();
setFocus(obj);
location.href = "#" + name;
}
}
</script>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="zh-cn">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="ie=edge"/>
</head>
<style>
/* 浮动列表==================================================== */
tr>td>div>ul{
position: fixed;
top: 0px;
left: 0px;
}
/* 列表样式=================================================== */
*{ margin:0px; padding:0px; font-size:22px; }
#menu{ width:160px; border:1px solid #ccc;}
#menu ul{ list-style:none;}
#menu ul li{ height:28px; line-height:28px; background:#FFCCFF; border-bottom:1px solid #333333; padding:0px 8px;position:relative;}
#menu ul li:hover ul{ display:block;}
#menu ul li ul{ display:none;position: absolute; left: 100px; top: 0px;width:100px; border:1px solid #ccc; border-bottom:none;}
a{color: #000000;text-decoration: none;}
a:hover{ color:blue;background:red;}
/* a:hover{ color:#00FFFF;} */
#第一列{
text-align:center
}
#第二列{
text-align:right
}
#第三列{
text-indent:40px
}
#第四列{
text-indent:40px
}
#第五列{
text-indent:40px
}
div{
max-width:1000px;
width:auto;
min-height:20px;
padding:3px;
line-height:30px;
word-wrap:break-word;
overflow-x:hidden;
overflow-y:auto;
font-family:仿宋;
color:blue;
font-size:20px;
margin:2px auto;
}
.border{
border: 1px solid #FF0000;
}
/* 列表项背景色跟随焦点div变化==================================== */
.listyle{
background-color:blue;
width:100px;
}
/* =============================================================== */
</style>
<body>
<table border=1 width="100%">
<tr>
<td width="160px"
bgcolor="skyblue"
valign="top"
line-height:20px;
>
<div id="menu">
<ul>
<li><a href="2.html#第一列">第一列</a></li>
<li><a href="2.html#第二列">第二列</a></li>
<li><a href="2.html#第三列">第三列</a></li>
<li><a href="2.html#第四列">第四列</a></li>
<li><a href="2.html#第五列">第五列</a></li>
</ul>
</td><td>
<div id="第一列" onpaste="divOnPaste(this)" contenteditable="true" onblur="setBlur(this,'第一列-表A-窗口A')" onfocus="setFocus(this,'第一列-表A');">绑定表A第一列</div>
<div id="第二列" onpaste="divOnPaste(this)" contenteditable="true" onblur="setBlur(this,'第二列-表A-窗口A')" onfocus="setFocus(this,'第二列-表A');">绑定表A第二列</div>
<div id="第三列" onpaste="divOnPaste(this)" contenteditable="true" onblur="setBlur(this,'第三列-表A-窗口A')" onfocus="setFocus(this,'第三列-表A');">绑定表A第三列</div>
<div id="第四列" onpaste="divOnPaste(this)" contenteditable="true" onblur="setBlur(this,'第四列-表A-窗口A')" onfocus="setFocus(this,'第四列-表A');">绑定表A第四列</div>
<div id="第五列" onpaste="divOnPaste(this)" contenteditable="true" onblur="setBlur(this,'第五列-表A-窗口A')" onfocus="setFocus(this,'第五列-表A');">绑定表A第五列</div>
</td></tr></table>
</body>
<script>
String.prototype.stripHTML = function () { var reTag = /<(?:.|\s)*?>/g; return this.replace(reTag, " "); }
function divOnPaste(d) { setTimeout(function () { d.innerHTML = d.innerHTML.stripHTML(); }, 10); }
/* 列表项背景色跟随焦点div变化============================================ */
function setClick(num){
var theNumber=parseInt(num)-1;
var liList=document.getElementsByTagName("li");
var listLength=liList.length;
for(var i=0;i<listLength;i++){
liList[i].className="";
}
liList[theNumber].className="listyle";
}
/* ======================================================================== */
function setFocus(obj,str2) {
obj.setAttribute("class", "border");
window.external.setPosition(str2);
}
function setBlur(obj, str2) {
obj.setAttribute("class", "");
window.external.setCurrentValue(obj.innerHTML, str2);
}
function init(s1, s2, s3, s4, s5) {
document.getElementById("第一列").innerHTML = s1.replace(/\r\n/g,"<p>");
document.getElementById("第二列").innerHTML = s2.replace(/\r\n/g,"<p>");
document.getElementById("第三列").innerHTML = s3.replace(/\r\n/g,"<p>");
document.getElementById("第四列").innerHTML = s4.replace(/\r\n/g,"<p>");
document.getElementById("第五列").innerHTML = s5.replace(/\r\n/g,"<p>");
}
function setElementFocus(name) {
var obj = document.getElementById(name);
if(obj != null) {
obj.focus();
setFocus(obj);
location.href = "#" + name;
}
}
</script>
</html>
<script>
String.prototype.stripHTML = function () { var reTag = /<(?:.|\s)*?>/g; return this.replace(reTag, " "); }
function divOnPaste(d) { setTimeout(function () { d.innerHTML = d.innerHTML.stripHTML(); }, 10); }
</script>
<div id="第一列" onpaste="divOnPaste(this)" contenteditable="true" onblur=" setBlur(this, '第一列-表A-窗口A')" onfocus=" setFocus(this, '第一列-表A');">绑定表A第一列</div>
<div id="第二列" onpaste="divOnPaste(this)" contenteditable="true" onblur="setBlur(this,'第二列-表A-窗口A')" onfocus="setFocus(this,'第二列-表A');">绑定表A第二列</div>
<div id="第三列" onpaste="divOnPaste(this)" contenteditable="true" onblur="setBlur(this,'第三列-表A-窗口A')" onfocus="setFocus(this,'第三列-表A');">绑定表A第三列</div>
<div id="第四列" onpaste="divOnPaste(this)" contenteditable="true" onblur="setBlur(this,'第四列-表A-窗口A')" onfocus="setFocus(this,'第四列-表A');">绑定表A第四列</div>
<div id="第五列" onpaste="divOnPaste(this)" contenteditable="true" onblur="setBlur(this,'第五列-表A-窗口A')" onfocus="setFocus(this,'第五列-表A');">绑定表A第五列</div>