Skip to content

Instantly share code, notes, and snippets.

View DiegoVallely's full-sized avatar
🎯
Focusing

Diego Sousa Miranda DiegoVallely

🎯
Focusing
View GitHub Profile
function onoffSelect_focus(obj){
var userAgent = window.navigator.userAgent.toLowerCase();
if(userAgent.indexOf("msie") > -1) {
obj.focus();
obj.select();
}else if(userAgent.indexOf("firefox") > -1) {
obj.focus();
obj.select();
}else if(userAgent.indexOf("opera") > -1) {