Opened 11 years ago
Closed 11 years ago
#10743 closed bug (invalid)
$ funciton can't work
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.7 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
May be my english is not good enough what problem is.My code is in below: var check_arr={
"server": {type:0,reg:"",fn_Y:""}, "port": {type:1,reg:"",fn_Y:""}, "db_user": {type:1,reg:"",fn_Y:""}, "db_password": {type:1,reg:"",fn_Y:""}, "db_name": {type:1,reg:"",fn_Y:""}, "db_prefix": {type:1,reg:"",fn_Y:""}, "admin_user": {type:1,reg:"",fn_Y:""}, "admin_pw": {type:1,reg:"",fn_Y:""}, "admin_re_pw": {type:1,reg:"",fn_Y:""}, "sys_prefix": {type:1,reg:"",fn_Y:""}
}; var bind_fn=function(){
var a=[]; for(var key in check_arr){
a.push($(key).val()); key is id of input,this can't work,but$(document.getElementById(key).val() can work well
}
alert(a.join());
}; I think this should be a bug,I don't want to used $(document.getElementById(key).val() in the future.
Please ask for help on the forum, this is not a bug report.