0

如何在 Sencha Touch 中制作一个简单的呼叫按钮

我的按钮声明为:

var callButton = {
            xtype: "button",
            text: 'Call College',
            ui: 'custom-btn-confirm',         
            maxWidth: '360px',
            padding:    '0 80 0 80',
            centered: true,
            flex: 1,
            scope: this,
            style: 'color: #ffffff',


            handler: function() {
                console.log("Make a Phone Call");
                //document.location.href = "tel:00112233"; // This does not work


            }

有关的

从 Sencha Touch 中的按钮触发“电话”链接

http://www.sencha.com/forum/showthread.php?127497-Firing-a-tel-link-from-a-button/page2&highlight=location.href

如何使用 phoneGap 和 Sencha Touch 2 通过 android 拨打设备电话?

http://rickluna.com/wp/2012/02/making-a-phone-call-from-within-phonegap-in-android-and-ios/

4

1 回答 1

1

您可以将按钮替换为

{html : "<a href='tel:{phone}' class='x-button call-button' target='_blank'>Call College</a>"}
于 2012-09-14T11:13:05.617 回答