dojox.charting - Appending Javascript Array Values to the DOJO div -


मेरे ऊपर दिखाए गए मानों का एक सरणी है।

  myarray2.push ("10 -FEB -11 "); myarray2.push ( "11-FEB-11"); myarray2.push ( "12-FEB-11"); myarray2.push ( "13-FEB-11"); myarray2.push ( "14-FEB-11");   

मैं इन मानों को डिव एचआरएक्सएक्सिसस्लिडर के अंदर दिखाना चाहता हूं जैसा कि दिखाया गया है (वर्तमान में इसकी हार्डकोड, लेकिन यह संभव है)

  & lt; div id = "hrxxxslider "डोजोप्रकार =" डोजॉक्सी.फॉर्म। हॉरिज़ॉन्टल रेंजस्लिडर "& gt; & Lt; ol dojoType = "dijit.form.HorizontalRuleLabels" & gt; & Lt; li & gt; 10-Feb-11 & lt; / li & gt; & lt; li & gt; 11-FEB-11 & lt; / li & gt; & lt; li & gt; 12-FEB-11 & lt; / li & gt; & lt; li & gt; 13-FEB-11 & lt; / li & gt; & lt; li & gt; 14-FEB-11 & lt; / li & gt; & Lt; / ol & gt; & Lt; / div & gt;    

आप इसे पाश के लिए एक सरल जावास्क्रिप्ट के साथ पूरा कर सकते हैं:

  var ol = document.getElementById ('एचआरएक्सएक्सिसस्लाइडर') .getElementsByTagName ('ओएल') [0], मा 2 एल = माइआररे 2। लैंप, I, htmlFrag = ''; (I = 0; i & lt; ma2l; i ++) के लिए {htmlFrag + = '& lt; li & gt;' + Myarray2 [i] + '& lt; / li & gt;'; } Ol.innerHTML = htmlFrag;   



Comments

Popular posts from this blog

qt - switch/case statement in C++ with a QString type -

python - sqlite3.OperationalError: near "REFERENCES": syntax error - foreign key creating -

Python's equivalent for Ruby's define_method? -