obj.setAttribute("丛铅物for"渗液激绝,"for对应的值")
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional/橘猛/EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"圆亮桥><html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/htmlcharset=gb2312" />
<title>无标题文档</title>
<script language="javascript">
function addid(obj,idname){
obj.id=idname
}
function showidname(){
alert(document.getElementById("current"键乎).id)
}
</script>
</head>
<body>
<a href="#" onclick="addid(this,'current')">测试测试</a><br/>
<a href="#" onclick="showidname()">看看有没有加上</a>
</body>
</html>
你好,这样写既可: 希望采运敏纳!!!!
$(function(){var title_text
$('#this_post_tags a').each(function(){
title_text= "点击查看更多与【卜掘" + $(this).text() + "】相关的内容"
$(this).attr('型悄核title',title_text)
})
})
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)