Skip to content

Commit 992a6b8

Browse files
committed
Add example
1 parent ce393f5 commit 992a6b8

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

ping.html

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<head>
2+
<script src="./ping.js"></script>
3+
<script>
4+
var do_ping = function() {
5+
ping(document.getElementById('pingurl').value).then(function(delta) {
6+
alert(delta);
7+
}).catch(function(error) {
8+
alert(String(error));
9+
});
10+
};
11+
</script>
12+
</head>
13+
<body>
14+
<input id='pingurl' type='text' value='http://google.com'></input>
15+
<button onclick='do_ping()'>Ping</button>
16+
</body>

0 commit comments

Comments
 (0)