का उपयोग कर मैंने किसी चीज़कैसे चर
var Messages = {
'fullName' : 'Tell us your cool name dude..! e.g. Yousuf Iqbal',
'userName' : 'Choose a catchy username. Remember! It should be available :)',
'password' : 'Choose a top secret password with special chars, numbers and alphabets',
'rePassword' : 'Retype the password you just typed. But, don\'t try to copy!',
'bYear' : 'Tell the year, in which this bomb blasted'
};
और एक चर राशि वस्तु संपत्ति का उपयोग करने की ..
var attribute = $('#userinfo form input').attr('name');
अब मैं संदेश इस तरह इस चर का उपयोग कर संपत्ति वस्तु का चयन करना चाहते ..
var message = Messages.attribute;
लेकिन यह काम नहीं कर रहा है .. और निम्नलिखित भी कोशिश की है ..
var message = Messages+'.'+attribute;
................. :) –