//适合于第一种选择操作的代码: // if ( eSelected.tagName == 'IMG' ) { // -- code for setting dialog values -- } // else // eSelected == null ; //this will replace the current selection if not the right type
}
//点击ok按钮发生的操作 function Ok() { if ( document.getElementById('txtHref').value.length > 0 ) FCKInsertLink.Add( txtHref.value, txtCaption.value ) ;
return true ; } </script> </head>
<body scroll="no" style="OVERFLOW: hidden"> <table height="100%" cellSpacing="0" cellPadding="0" width="100%" border="0"> <tr> <td> <table cellSpacing="0" cellPadding="0" align="center" border="0"> <tr> <td> Type the URL for the link<br> <input id="txtHref" type="text"><br> Type the caption for the link<br> <input id="txtCaption" type="text"> </td> </tr> </table> </td> </tr> </table> </body> </html>