function f(){ var choose = rangy.getSelection().toString(); document.getElementById("t1").innerHTML=choose; };