|
|
|
|
|
для: localGhost
(10.09.2007 в 18:59)
| | потому что с буфером тока в ИЕ будет | |
|
|
|
|
|
|
| Нашел решение вопроса который задавал в теме "работа с буфером в JS (скопировать значение в переменную)" (http://softtime.ru/forum/read.php?id_forum=4&id_theme=42931&page=1). Быть может кому-то пригодится:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>load from buffer</title>
<script type="text/javascript">
function $(id) {
return document.getElementById(id);
}
function run() {
$('buffer').contentWindow.focus();
var iframe = $('buffer').contentWindow.document;
iframe.body.innerHTML = "";
iframe.execCommand("Paste", false, null);
alert (iframe.body.innerHTML);
}
</script>
</head>
<body>
</body>
<a href="javascript:run()">Paste</a>
<iframe frameborder="0" id="buffer" style="width: 100%; height:400px;border: 1px solid #ccc;"></iframe>
<script>
$("buffer").contentWindow.document.designMode = "on";
</script>
</html>
|
писалось для MSIE поэтому работоспособность в других браузерах не проверял. | |
|
|
|
|