Posts

Anccc

  quiz in Javascript                 Quiz for all Exams Test Quiz                         Question of                                                                     Next                                        Good Try!       You Got out of answers correct!       That's             TryAgain        

Bbbb

1 function selectText(element) { 2 // select the text 3 // thank you: http://stackoverflow.com/questions/18611992/selected-text-inside-div 4 var doc = document 5 , text = doc.getElementById(element) 6 , range, selection 7 ; 8 if (doc.body.createTextRange) { //ms 9 range = doc.body.createTextRange(); 10 range.moveToElementText(text); 11 range.select(); 12 } else if (window.getSelection) { //all others 13 selection = window.getSelection(); 14 range = doc.createRange(); 15 range.selectNodeContents(text); 16 selection.removeAllRanges(); 17 selection.addRange(range); 18 } 19 };  

Quix

  quiz in Javascript                 Quiz for all Exams Test Quiz                         Question of                                                                     Next                                        Good Try!       You Got out of answers correct!       That's             TryAgain