object - How can i a string use as a objectname in javascript? -


how can use string object name?

var = "hello",     b = {       hello : "word"     };   alert(b.a); 

this give in empty box. want still use variable a.

how can string use objectname in javascript?

this how it.

window["obj"] = { hello:"word"}; 

Comments

Popular posts from this blog

c++ - How to add Crypto++ library to Qt project -

jQuery Mobile app not scrolling in Firefox -

How to use vim as editor in Matlab GUI -