我有一個包含文本和html的數組。 myArray的[1]包含以下.. myArray的[2]包含同樣的事情,只是不同的名字「約翰」等我如何根據其中的一個內容對數組進行排序
153); color: white; cursor: pointer; font-size: 12px; font-weight: normal; font-family:
Arial;" onmouseover="this.style.backgroundColor = 'white'; this.style.color='#336699'"
onmouseout="this.style.backgroundColor = ''; this.style.color = 'white'; "
onclick="if(top.mail.checkDataset()) mail.execFunction('javascript: changeMain(\'orderCreate1.do\')')">
<img alt="" src="images/round-white-bullet.gif" height="10" width="10"> John<br>
整個陣列,使其忽略一切,由名sortsd我怎樣才能進行排序'約翰'在這種情況下?名稱總是在圖像之後和之前br
如果有幫助
請讓您的文章易讀。 – Mat 2011-03-18 11:58:01
你的意思是單個數組元素具有所有標記嗎?在你的例子中,不清楚在這裏分隔數組元素。目前還不清楚「按照約翰'的名稱排序」的含義。你能澄清一下嗎? – kojiro 2011-03-18 11:59:44
OP中給出的代碼與該問題不符,請編輯 – 3rgo 2011-03-18 12:53:24