0

我正在调用一个函数 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


                    }
                });
            }
4

1 回答 1

0

我不确定您是否尝试了以下示例并相应地更改了代码:

https://dojotoolkit.org/reference-guide/1.8/dijit/form/ValidationTextBox-tricks.html#dijit-form-validationtextbox-tricks

于 2012-09-28T08:22:03.150 回答