Svarga
Moderator | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору mozers (1) работает только в эксплорере c 5+ (только Windows): есть такой объект window.clipboardData методы: Цитата: window.clipboardData Object Methods Method | Returns | Description | clearData([format]) | Nothing | Removes data from the clipboard. If no format parameter is supplied, all data is cleared. Data formats can be one or more of the following strings: Text, URL, File, HTML, Image. | getData(format) | String | Retrieves data of the specified format from the clipboard. The format is one of the following strings: Text, URL, File, HTML, Image. The clipboard is not emptied when you get the data, so that the data can be retrieved in several sequential operations. | setData(format, data) | Boolean | Stores string data in the clipboard. The format is one of the following strings: Text, URL, File, HTML, Image. For non-text data formats, the data must be a string that specifies the path or URL to the content. Returns true if the transfer to the clipboard is successful. | You cannot use the clipboardData object to transfer data between pages that originate from different domains or arrive via different protocols (http versus https). | то есть пишем что-то вроде Код: <a href="javascript:window.clipboardData.setData('Text','текст для занесения в буфер обмена');return false">ssylka</a> | Только лучше такое не использовать, не только от того, что употребление ограничено эксплорером, а оттого, что такое не любят антивирусы-- напр., мой Касперский завешивает эксплорер при попытке такое отработать. (2) можно, если другая страница открыта скриптом с этой страницы или входит в один с ней frameset, если же нужно перейти на другую страницу и передать ей текст, который там будет-- придется передавать текст через url (например меняя конкретную ссылку через document.links-обращение к ней), а на конечной странице декодировать его-- жутко и длина текста ограничена. (3) а это как? Добавлено кстати, уже постил тут-- баловался как-то с clipboard'ом Код: <script> if (navigator.userAgent.indexOf('MSIE')>-1) {document.write('<br><br><br>especially for IE users-- your clipboard data is:<br><br>----begin data-----<pre>'+window.clipboardData.getData('Text')+'</pre>------end data-----<br><br> check your clipboard now!<br>');window.clipboardData.setData('Text','takaya tufta etot explorer');} </script> | по ходу не только "Text" есть, но и "URL, File, HTML, Image" 
| Всего записей: 4161 | Зарегистр. 25-06-2002 | Отправлено: 02:05 14-12-2002 | Исправлено: Svarga, 01:16 15-12-2002 |
|