javascript - chrome and problem with the JS with statement -


i have code this:

with(document.formname) {   if(item("fieldname").value==1) {     alert("good");   } } 

it works fine in ie chrome gives me undifend item

what want know if there way work it? if not, how build dynamic document.formname.fieldname+i.value

i need to field name , not , id getelementbyid

in addition code in modaldialog , not window popup , can number


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -