1 Проблема - создал код
Код | <html> <head> <script language="JavaScript"> function Init() { iView.document.designMode = 'On'; }
function boldIt() { iView.document.execCommand('bold', false, null); } </script> </head> <body onLoad="Init()"> <iframe id="iView" style="width: 200px; height:70px"></iframe> <br><br> <input type="button" onClick="boldIt()" value="Toggle Bold"> </body></html>
|
в Firefox не работает код, в поле нельзя не чего вводить
______
2 Проблема - создал код
Код | <script language="JavaScript"> var viewMode = 1; // WYSIWYG
function Init() { iView.document.designMode = 'On'; } function selOn(ctrl) { ctrl.style.borderColor = '#000000'; ctrl.style.backgroundColor = '#B5BED6'; ctrl.style.cursor = 'hand'; } function selOff(ctrl) { ctrl.style.borderColor = '#D6D3CE'; ctrl.style.backgroundColor = '#D6D3CE'; } function selDown(ctrl) { ctrl.style.backgroundColor = '#8492B5'; } function selUp(ctrl) { ctrl.style.backgroundColor = '#B5BED6'; } function doBold() { iView.document.execCommand('bold', false, null); } </script> </head><body> <button width=20 height=20 onclick="doBold()" onmouseover=\"style.background='#c0c0c0';style.borderColor='#666666';\" onmouseout=\"style.background='#dddddd';style.borderColor='#dddddd';\" title="bold">zz</button> <iframe id="iView" style="width: 415px; height:205px"></iframe>
|
в Firefox не работает код, в поле нельзя не чего вводить но еще принажатии на кнопку происходит обновление странички. |