复制番号代番号次のように:
function getSelectedText() { //この関数コードは http://www.codetoad.com/javascript_get_selected_text.asp から借用しました。
var txt = "";
if (window.getSelection) {
txt = window.getSelection();
else if (window.document.getSelection) {
txt = window.document.getSelection();
else if (window.document.selection) {
txt = window.document.selection.createRange().text;
}
テキストを返します。
}