sencha touch 的零碎知识点

本文深入探讨了Ext.js库中按钮的UI样式配置及正则表达式的使用方法,详细解释了如何通过Ext.Ajax.request进行异步请求,并通过测试方法检查字符串是否包含特定模式。
A--JAX
Ext.Ajax.request({
    url: 'page.php',
    params: {
        id: 1
    },
    success: function(response){
        var text = response.responseText;
        // process server response here
    }
});

Ext.Ajax.setTimeout(60000); // 60 seconds


TEST

( str ) : Boolean

Tests for a match in its string parameter.

When you want to know whether a pattern is found in a string use the test method (similar to theString.search method); for more information (but slower execution) use the exec method (similar tothe String.match method). As with exec (or in combination with it), test called multiple times onthe same global regular expression instance will advance past the previous match.


function testinput(re, str){
    if (re.test(str))
        midstring = " contains ";
    else
        midstring = " does not contain ";
    document.write (str + midstring + re.source);
}

button的UI

: String

The ui style to render this button with. The valid default options are:

  • 'normal' - a basic gray button (default).
  • 'back' - a back button.
  • 'forward' - a forward button.
  • 'round' - a round button.
  • 'plain'
  • 'action' - shaded using the $active-color (dark blue by default).
  • 'decline' - shaded using the $alert-color (red by default).
  • 'confirm' - shaded using the $confirm-color (green by default).


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值