开发者

PhoneGap "On menu press launch url"

I am currently working on an e-book for the android platform. I'm using Eclipse, Dreamweaver and the phonegap libraries. Is there a way i can have a new page or dialog display on the action of 开发者_JAVA百科pressing the menu key.


Add this line to your onLoad handler

<script type="text/javascript" charset="utf-8">

    function onLoad() {
        document.addEventListener('menubutton', onMenuKeyDown);
    }

function onMenuKeyDown() {
}

You can then perform any action you like in your onMenuKeyDown function.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜