在dijit.form.ValidationTextBox上设置约束

时间:2012-09-27 06:15:41

标签: javascript dojo

我正在调用函数onblur ..该函数调用ajax并且ajax获取字符串..

现在我想要如果字符串中的值可用..则文本框变为红色..

我的ajax代码是

function ucheck(){
                dojo.xhrPost({
                    // The URL to request
                    url: "ucheck",
                    timeout :  3000 ,
                    content: {
                    username: dojo.byId("pref_id").value

                    },
                    // The method that handles the request's successful result
                    // Handle the response any way you'd like!
                    load: function(result) {
                        var fi=result;
                        document.getElementById('co').innerHTML=fi // this is print the value in lable


                    }
                });
            }

1 个答案:

答案 0 :(得分:0)