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