|
a)Create a div tag area having its id as "testarea"
Ex:- <div class="copybox" id="testarea">
b)Create a button with any name and call the function fnSelect(testarea) by using onclick event.
Ex- <input type="button" value="Copy Code" onClick="fnSelect('testarea')"
>
c)Now just copy the above free javascript selecting code in to your web pages head tag and test it for
selecting contents of div tag.
Selecting div area....
|