blob: 52fa99773c9553a9145d5ca5899829f677e82130 [file] [log] [blame]
Dominique Hazael-Massieuxf69fc722013-05-30 12:31:401<!DOCTYPE html>
Zhiqiang Zhang2f202f42014-06-24 14:28:532<html>
Dominique Hazael-Massieuxf69fc722013-05-30 12:31:403 <head>
4 <meta charset='utf-8'/>
5 <title>Vibration API: test a simple array parameter to vibrate()</title>
6 <link rel='author' title='Robin Berjon' href='mailto:robin@berjon.com'/>
7 <link rel='help' href='http://www.w3.org/TR/vibration/#methods'/>
Dominique Hazael-Massieuxf69fc722013-05-30 12:31:408 </head>
9 <body>
10 <h1>Description</h1>
11 <p>
12 After hitting the button below, your device must vibrate continuously for about two seconds, once.
13 </p>
14 <button id='vib'>Vibrate!</button>
15 <div id='log'></div>
Dominique Hazael-Massieuxf69fc722013-05-30 12:31:4016 <script>
Zhiqiang Zhang1fde24c2014-11-18 03:00:2517 document.getElementById("vib").onclick = function () {
18 navigator.vibrate([2000]);
19 };
Dominique Hazael-Massieuxf69fc722013-05-30 12:31:4020 </script>
21 </body>
22</html>