redireccionar con html y javascript
Publicado por juan antonio (2 intervenciones) el 10/07/2018 10:09:01
Como puedo abrir una pagina web segun el navegador que tenga, no me termina de abrir la pagina web, quiero que busque si tengo le navegador web internet explorer 11 y si esta que habra una la pagina web, pero no termina de ejecutar la pagina web, este seria el codigo:
Gracias por la ayuda, quiero hacer un html con la funcion if de javascript para que me detecto el navegador
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<html>
<head>
<title>CONSOLA ONLINE</title>
</head>
<body>
<script>
function isIE () {
var myNav = navigator.userAgent.toLowerCase();
return (myNav.indexOf('msie') != -1) ? parseInt(myNav.split('msie')[1]) : false;
}
var ua = window.navigator.userAgent;
//Internet Explorer | if | 8-11
if (isIE () == 11) {
window.open ("https://www.google.es/")
}
</script>
</body>
</html>
Gracias por la ayuda, quiero hacer un html con la funcion if de javascript para que me detecto el navegador
Valora esta pregunta
0