返回jQuery操......登陆

jQuery操作属性

手机用户3522113522018-12-22 23:33:57218

<!doctype html>

<html>

<head>

<meta charset="utf-8">

<script src="jquery/jquery-3.1.1.js" type="text/javascript"></script>

<script type="text/javascript" >

$(function(){ 

    $("img").each(function(){

        $(this).after("<span>" + $(this).attr("title") + "</span>");

    })

})

</script>

<style type="text/css">

img{height:200px; margin:2px;}

</style>

</head>

<body>

<img src="images/1.jpg" title="淘气包"  />

<img src="images/2.jpg" title="得意忘形"  />

<img src="images/3.jpg" title="快乐宝贝"  />

</body>

</html>


最新手记推荐

• 用composer安装thinkphp框架的步骤• 省市区接口说明• 用thinkphp,后台新增栏目• 管理员添加编辑删除• 管理员添加编辑删除

全部回复(0)我要回复

暂无评论~
  • 取消回复发送