我有一个简单的 View ,其中包含用户的信息。当我点击电话号码时,我可以调用该号码,一切正常。
当我点击标题栏中的用户号码时,我也可以调用该号码。用户号码不是电话号码,而是某种 ID,我不想调用该号码。我只能在 android 4.0.4 上像电话号码一样调用用户号码(位于标题栏中)。
在 iPhone 4 (iOS 6) 和 Android 4.1.2 上,这种情况不会发生,即我只能调用电话号码。
有人可以告诉我有什么问题吗?我该如何解决这个问题?
Ext.define("CallPhoneApp.view.Test", {
extend: "Ext.form.Panel",
requires: "Ext.form.FieldSet",
alias: "widget.testview",
config: {
scrollable: "vertical",
items: [
{
xtype: "toolbar",
docked: "top",
title: "<div>User No. 8344396856</div>"
},
{ xtype: "fieldset",
items: [
{
xtype: "label",
html: "First name"
},
{
xtype: "label",
html: "Last name"
},
{
xtype: "label",
html: "Home phone num. <a href='tel:{+38999888777}'>home</a>"
}
]
}
]
}
});
最佳答案
试试这个
<a href="#" name="tel:8344396856">8344396856</a>
你的听众会是这样的——
listeners :{
element : "element",
delegate : "a",
tap: function (e,eopts) {
var link=e.target.name;
window.location.href = link;
}
}
关于sencha-touch-2 - Sencha Touch 2 在 Android 4.0.4 上无法正常调用电话号码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16441800/