我使用http://jqueryui.com/selectable/#display-grid和选项进行多个选择,就像我在这里做的那样:https://stackoverflow.com/questions/16269438/how-can-i-select-and-deselect-multiple-grid-icons-in-javascript-and-show-the-sel
谁能解释一下为什么我可以替换“标题”文本信息-2,而不是文字信息-1里面的李标记!
<li class="ui-state-default" title="Info-2">Info-1</li>这个很好用:
$('li').each(function(index, temp){ $(temp).attr('title', ar[index+1][kLan] ); });但不是这个:
$('li').each(function(index2, temp2){
var tmp = $(temp2).text();
$(temp2).attr(tmp, ar[index2+1][kLan] ); });这是我得到的错误:
XML异常5:指定了无效或非法字符,例如在jquery-1.9.1.js:2358INVALID_CHARACTER_ERR:名称.中
发布于 2013-07-10 23:23:04
我自己解决了这个问题:
$('li').each(function(index, temp){ $(temp).html(ar[index+1][kLan] ); });现在一切都很好!
https://stackoverflow.com/questions/17300306
复制相似问题