< m et a nam e=&quot;v i ew por t &quot; cont ent = &quot; wi dt h= dev i ce -wi dt h; h ei ght = dev i ce- hei ght &quot; / >
< scri pt t y pe=&quot; t ext/ J av aScri pt &quot; >
f uncti on v i br at eA l ert( ) {
i f ( sa m pl e.al er t .vi br at eSuppo rt ed)
{
}
el se
}
sa m pl e.al ert .v i br at e( 10 00) ;
al ert( ' ext ensi on not support ed' ) ;
< / scri pt >
< / head >
< body >
< di v >
< i nput t y pe=&quot; subm i t &quot; v a l ue=&quot; A l ert &quot; oncli ck=&quot;v i br at eA l ert() &quot; />
< / di v >
< / body >
< / ht m l >
Config.xml的内容如下:
< ? xm l v er si on= &quot; 1.0&quot; encodi ng= &quot; ut f- 8&quot; ? >
< wi dget xm l ns=&quot; htt p:/ / ww w . w 3.or g/ ns/ wi dget s&quot; xm l ns: r i m = &quot; htt p: / / ww w .bl ackber r y .co m / ns/ w i dget s&quot; v er si on= &quot; 1.0.0&quot; >
< nam e> A l er t W i dget < / nam e>
< des cri pti on>
Sam pl e wi dget t hat dem onst r at es how t o use
t he A l er t A P I t o v i br at e t he Bla ck Berr y S m art phone
< / des cri pti on>
< aut hor hr ef = &quot; htt p://w w w .r i m .co m / &quot;
r i m : cop y ri ght = &quot; no cop y ri ght &quot;
em ail = &quot; aut hor _nam e@aut hor dom ai n.com &quot; > Com pany N am e ? A ut hor N a m e
< / aut hor >
< cont ent sr c = &quot; i ndex.ht m l &quot; / >
< f eat ur e i d= &quot; sa m pl e&quot; />