| 
		
			| Qartvela™ | 20.03.2012 18:01 |  
 кнопка после выделений
 
	Код: 
 <script language=javascript>var txt_quote="";
 function copy_txt() {
 txt_quote="";
 if (window.getSelection) {
 txt_quote = window.getSelection().toString();
 } else if (document.getSelection) {
 txt_quote = document.getSelection();
 } else if (document.selection) {
 txt_quote = document.selection.createRange().text;
 }
 }
 
 function paste_txt(textarea) {
 document.getElementById('myeditor').focus();
 document.getElementById('myeditor').value += " ("+ txt_quote +") ";
 }
 </script>
 хочу в нем добавить функцию: показать кнопку после выделения
   
кнопка:
 
	Код: 
 <a onmouseover="copy_txt();" href="javascript:paste_txt('txt_msg');"><input type='button' value='Get selection' class='input_submit alt'/>
 </a>
 пожалуйста имейте в виду: мой знания в яваскрипт не больше o Copy/Paste :( |