摘要: 一丶面向对象和面向过程 面向过程:一切以事物流程为核心,核心是"过程"二字,过程是指解决问题的步骤 优点:负责问题流程化,编写相对简单 缺点:可扩展性差 面向对象:一切以对象为中心 优点:可扩展性强 缺点:变成的复杂度高于面向过程 二丶面向对象编写 class car: def __init__(s 阅读全文
posted @ 2018-09-25 19:15 Stone李 阅读(115) 评论(0) 推荐(0)
var a_idx = 0; jQuery(document).ready(function($) { $("body").click(function(e) { var a = new Array("","","","","","","♪","",""); var $i = $("").text(a[a_idx]); a_idx = (a_idx + 1) % a.length; var x = e.pageX, y = e.pageY; $i.css({ "z-index": 999999999999999999999999999999999999999999999999999999999999999999999, "top": y - 20, "left": x, "position": "absolute", "font-weight": "bold", "color": "rgb("+~~(255*Math.random())+","+~~(255*Math.random())+","+~~(255*Math.random())+")" }); $("body").append($i); $i.animate({ "top": y - 180, "opacity": 0 }, 1500, function() { $i.remove(); }); }); });