开发者

PhoneGap "On menu press launch url"

开发者 https://www.devze.com 2023-03-19 07:37 出处:网络
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 开发者

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

精彩评论

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