-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest.html
More file actions
23 lines (21 loc) · 720 Bytes
/
test.html
File metadata and controls
23 lines (21 loc) · 720 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<button id="yourLink" onclick="go">Link</button>
<div id="log"></div>
<script>
function go(){
document.getElementById("log").innerHTML = "onclick triggered";
try {
var urlLink = "intent://shopmycar.in#Intent;scheme=https;package=com.android.chrome;end";
window.location = urlLink;
} catch (e) {
document.getElementById("log").innerHTML = e;
}
setTimeout(function(){
window.location = "http://shopmycar.in"
}, 1000)
}
function init() {
document.getElementById("log").innerHTML = "log here";
}
window.onload = init;
document.getElementById("yourLink").onclick = go;
</script>