Working with javascript method -


मान की तरह '4,3' प्राप्त करने के लिए मेरे पास यह है:

  var मान = Objeto.row (4) .cell (3);   

जेएस विधि को विकसित करने के लिए सही फॉर्म क्या है? मुझे लगता है कि मुझे ऐसा कुछ करना है:

  फ़ंक्शन ओजेटो (पंक्ति इंडैक्स) {सेल: फ़ंक्शन (सेलआईंडएक्स) {वापसी पंक्ति इंडेक्स + ',' + सेल इंडेक्स; }}   

मुझे पता है कि यह काम नहीं करता है, यह केवल अनुमान है धन्यवाद ...

यदि आप पदानुक्रम रखना चाहते हैं जहां कोशिकाएं पंक्तियों से संबंधित हैं, तो आप यह कर सकता है:

  var objeto = {पंक्ति: फ़ंक्शन (पंक्ति इंडैक्स) {रिटर्न (फ़ंक्शन (पंक्ति इंडैक्स) {this.cell = function (cellIndex) {return rowIndex + ',' + cellIndex; }; वापसी {सेल: this.cell}} (पंक्ति इंडैक्स)); }}    

Comments

Popular posts from this blog

mysql - where clause in inner join query -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -