$(".c1").click(function(){$(this).css("border","2px red solid")}).appendTo($this)
前后顺序....
需要准备的材料分别有:电脑、浏览器、html编辑器。
1、首先,打开html编辑器,新建html文件,例如:index.html,输入问题基础代码。
2、在index.html中的<script>标签中,输入js代码:$('body').append($('body').css('z-index'))。
3、浏览器运行index.html页面,此时成功打印出了z-index的值。
var showimg = "<div class=\"imgFocus\"><h6>单击关闭</h6><img src=\"" + imgSrc + "\" alt=\"" + imgAlt + "\" /></div>"$(this).parent("p").css("position","relative").append(showimg)