如何在Sencha Touch中拨打电话按钮

时间:2012-09-14 07:19:02

标签: html5 sencha-touch

如何在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


            }

相关

Fire 'tel' link from button in Sencha Touch

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

How can make a device phone call by android using phoneGap and Sencha Touch 2?

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

1 个答案:

答案 0 :(得分:1)

您可以按

替换按钮
{html : "<a href='tel:{phone}' class='x-button call-button' target='_blank'>Call College</a>"}