<script type="text/javascript">
function selectText(containerid) {
if (document.selection) {
var range = document.body.createTextRange();
range.moveToElementText(document.getElementById(containerid));
range.select();
} else if (window.getSelection) {
var range = document.createRange();
range.selectNode(document.getElementById(containerid));
window.getSelection().addRange(range);
}
}
</script>
<style>
#selectable div{
width:10px;
}
</style>
<a href="#" onclick="selectText('selectable')">Select all</a>
<div id="selectable" style="background:#000;color:#fff;">
<div>
http://ul.to/files/5tghy76
http://k2s.cc/files/5tghy77
http://rg.to/files/5tghy78
</div>
</div>