我正试图这样做,是穿透这一超文本,并获取一阵nes的这种超文本价值,即希望 gr。
It might look complex at first but is a simple question...
html
<div class="configureData">
<div title="Large">
<a href="yellow" title="true" rel="$55.00" name="sku22828"></a>
<a href="green" title="true" rel="$55.00" name="sku224438"></a>
<a href="Blue" title="true" rel="$55.00" name="sku22222"></a>
</div>
<div title="Medium">
<a href="yellow" title="true" rel="$55.00" name="sku22828"></a>
<a href="green" title="true" rel="$55.00" name="sku224438"></a>
<a href="Blue" title="true" rel="$55.00" name="sku22222"></a>
</div>
<div title="Small">
<a href="yellow" title="true" rel="$55.00" name="sku22828"></a>
<a href="green" title="true" rel="$55.00" name="sku224438"></a>
<a href="Blue" title="true" rel="$55.00" name="sku22222"></a>
</div>
</div>
javascript
//This script is just part of a Object containing methods.
parseData:function(dH){
dH.find(".configureData div").each(function(indA, eleA){
colorNSize.tempSizeArray[indA] = [eleA.title,[],[],[]]
$(eleZ).find("a").each(function(indB, eleB){
colorNSize.tempSizeArray[indA][indB] = eleB.title
})
})
},
我希望最后几个阵列也这样做。
[
["large",
["yellow", "green", "blue"],
["true", "true", "true"],
["$55", "$55","$55"]
],
["Medium",
["yellow", "green", "blue"],
["true", "true", "true"],
["$55", "$55","$55"]
]
]
// and so on....