Javascript How To Implement Text Selection Like Default Browser

Javascript How To Implement Text Selection Like Default Browser