我有一个包含文本和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