<! DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > < HTML > < HEAD > < TITLE > New Document </ TITLE > < META NAME ="Generator" CONTENT ="EditPlus" > < META NAME ="Author" CONTENT ="" > < META NAME ="Keywords" CONTENT ="" > < META NAME ="Description" CONTENT ="" > </ HEAD > < BODY > < input type ="text" name ="tt" value ="ttttttttttttt" > < input type ="button" onclick ="al();" > < script > ... function al() ...{ alert(document.selection.createRange().text); } </ script > </ BODY > </ HTML >