simple-array-manual.html (664B)
1 <!DOCTYPE html> 2 <html> 3 <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'/> 8 </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> 16 <script> 17 document.getElementById("vib").onclick = function () { 18 navigator.vibrate([2000]); 19 }; 20 </script> 21 </body> 22 </html>