<div class="htmlarea"><textarea id="runcode89722"> <title>DirMap</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <style> * { font-size: 12px } body { margin: 10px; padding: 0px } A { COLOR: black; TEXT-DECORATION: none; } A:hover { COLOR: black; TEXT-DECORATION: none; } A:link { TEXT-DECORATION: none } A:visited { TEXT-DECORATION: none } table.list{ cursor: default; border:1px solid #cccccc background-color: #cccccc; border-collapse: collapse; border-Color: #cccccc; } </style> <script> function check_form() { var the_form = document.forms[0]; if(!/^[\w\.]+$/.test(the_form.name.value)) { alert('Bad File Name !'); the_form.name.focus(); return false; } if(!/^[0-7]{3}$/.test(the_form.attrib.value)) { alert('Bad File Attrib !'); the_form.attrib.focus(); return false; } if(the_form.del.checked) { return confirm('Are you sure to delete the file ?'); } return true; } function show_ln(){ var txt_ln = document.getElementById('txt_ln'); var txt_main = document.getElementById('txt_main'); txt_ln.scrollTop = txt_main.scrollTop; while(txt_ln.scrollTop != txt_main.scrollTop) { txt_ln.value += (i++) + '\n'; txt_ln.scrollTop = txt_main.scrollTop; } return; } function editTab(){ var code, sel, tmp, r var tabs='' event.returnValue = false sel =event.srcElement.document.selection.createRange() r = event.srcElement.createTextRange() switch (event.keyCode){ case (8) : if (!(sel.getClientRects().length > 1)){ event.returnValue = true return } code = sel.text tmp = sel.duplicate() tmp.moveToPoint(r.getBoundingClientRect().left, sel.getClientRects()[0].top) sel.setEndPoint('startToStart', tmp) sel.text = sel.text.replace(/^\t/gm, '') code = code.replace(/^\t/gm, '').replace(/\r\n/g, '\r') r.findText(code) r.select() break case (9) : if (sel.getClientRects().length > 1){ code = sel.text tmp = sel.duplicate() tmp.moveToPoint(r.getBoundingClientRect().left, sel.getClientRects()[0].top) sel.setEndPoint('startToStart', tmp) sel.text = '\t'+sel.text.replace(/\r\n/g, '\r\t') code = code.replace(/\r\n/g, '\r\t') r.findText(code) r.select() }else{ sel.text = '\t' sel.select() } break case (13) : tmp = sel.duplicate() tmp.moveToPoint(r.getBoundingClientRect().left, sel.getClientRects()[0].top) tmp.setEndPoint('endToEnd', sel) for (var i=0; tmp.text.match(/^[\t]+/g) && i<tmp.text.match(/^[\t]+/g)[0].length; i++) tabs += '\t' sel.text = '\r\n'+tabs sel.select() break default : event.returnValue = true break } } </script> <table width="700" class="list" border="1" bgcolor="#eeeeee" bordercolorlight="#000000" bordercolordark="#FFFFFF" cellpadding="0" cellspacing="0"> <tr bgcolor="#cccccc"> <td colspan="2" height="20"> <div align="center"> <b>File Information</b> </div> </td> </tr> <tr> <td colspan="2"> <form name="edit" method="post" action="fso_edit.php" onsubmit="return check_form()"> <table width="90%" border="0" align="center"> <tr> <td>Name 锛</td> </tr> </table> </form> </td> </tr> </table></textarea></div>