EXDestroyer
V2EX  ›  jQuery

jQuery 的 index()方法有办法返回二维的数组索引吗?

  •  
  •   EXDestroyer · Feb 7, 2015 · 3129 views
    This topic created in 4198 days ago, the information mentioned may be changed or developed.

    jQuery的index()方法有办法返回二维的数组索引吗?
    比如x:1 y:2

    2 replies    2015-02-07 22:34:02 +08:00
    kisshere
        1
    kisshere  
       Feb 7, 2015
    只有each遍历上一层数组,看是否在数组里面
    haozhang
        2
    haozhang  
       Feb 7, 2015 via iPhone
    为什么不用对象呢,一个对象数组包含很多个点dui xiang,对象表示一个点,有xy属性。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   904 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 21:21 · PVG 05:21 · LAX 14:21 · JFK 17:21
    ♥ Do have faith in what you're doing.