我正在调用函数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
}
});
}
答案 0 :(得分:0)