EXDestroyer
V2EX  ›  jQuery

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

  •  
  •   EXDestroyer · Feb 7, 2015 · 3037 views
    This topic created in 4144 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   ·   2635 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 04:54 · PVG 12:54 · LAX 21:54 · JFK 00:54
    ♥ Do have faith in what you're doing.