0

i am currently developing an windows store app on the platform of JavaScript, I have added a button in the app bar.

If the button is clicked, it should be open fb.me/mypage. I dunno how to do this ? help me out.

HTML CODE:

<div id="appBar" data-win-control="WinJS.UI.AppBar" data-win-options="">
        <button 
            data-win-control="WinJS.UI.AppBarCommand" 
            data-win-options="{id:'button1',label:'Like Us',icon:'like',
                section:'selection',tooltip:'Like us'}">
        </button>
</div>
4

1 回答 1

0
    document.getElementById("button1").addEventListener("click", function () { //Whatever  you want to do });

将上面的代码放入

    args.setPromise(WinJS.UI.processAll().then(function () { //place it here}); 
于 2013-08-19T10:26:15.920 回答