Ticket #10743 (closed bug: invalid)
$ funciton can't work
| Reported by: | kotoyo1516@… | Owned by: | |
|---|---|---|---|
| Priority: | undecided | Milestone: | None |
| Component: | unfiled | Version: | 1.7 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
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.
Change History
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

Please ask for help on the forum, this is not a bug report.