摘要: 样式中设置content为元素的data-值 p{ color: deepskyblue; } p:before{ content: attr(data-beforeContent); color: darkred; } 然后js修改 $('p').on('click',function(){ $( 阅读全文
posted @ 2019-09-04 14:42 古月大叔 阅读(987) 评论(0) 推荐(0) 编辑
摘要: 字符串 1 使用&quot; 。比如: (&quot;'+key+'&quot;)例: htmlStr = htmlStr + '<span><img src="'+src+'"/><i onclick="deleteFile(&quot;'+key+'&quot;);" class="fa fa- 阅读全文
posted @ 2019-09-04 09:56 古月大叔 阅读(3558) 评论(0) 推荐(0) 编辑