![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
JavaScript
米斯特程序猿
爱生活,爱自己,爱家人,不抛弃,不放弃,敢冒险
展开
-
Jquery绑定事件(bind和live的区别)
Jquery中绑定事件有三种方法:以click事件为例 (1)target.click(function(){}); (2)target.bind("click",function(){}); (3)target.live("click",function(){}); 第一种方法很好理解,其实就和普通JS的用法差不多,只是少了一个on而已 第二、三种方法都是绑定转载 2016-02-17 10:26:50 · 242 阅读 · 0 评论 -
uploadify3.1版本参数使用详解
id: jQuery(this).attr('id'),//绑定的input的ID langFile: 'http://www.static-xxx.nu/uploader/uploadifyLang_en.js',//语言包的路径,能设置所有的提示文字 swf: 'http://www.static-xxx.nu/uploader/uploadify.swf',//[必须设置转载 2016-02-17 10:27:46 · 231 阅读 · 0 评论 -
jquery读写cookie
新建一个js文件,将如下脚本拷贝进去 jQuery.cookie = function(name, value, options) { if (typeof value != 'undefined') { options = options || {}; if (value === null) { value = ''; options = $.extend({转载 2016-02-17 10:24:31 · 394 阅读 · 0 评论 -
JS中实现replaceAll的方法
第一次发现JavaScript中replace()方法如果直接用str.replace("-","!")只会替换第一个匹配的字符. 而str.replace(/\-/g,"!")则可以全部替换掉匹配的字符(g为全局标志)。 replace() Thereplace()methodreturnsthestringthatresultswhenyoureplacetextmatchingit转载 2016-02-17 10:24:26 · 2863 阅读 · 0 评论 -
JS获取浏览器窗口大小
网页可见区域宽:document.body.clientWidth 网页可见区域高:document.body.clientHeight 网页可见区域宽:document.body.offsetWidth(包括边线的宽) 网页可见区域高:document.body.offsetHeight(包括边线的宽) 网页正文全文宽:document.body.scrollWidth 网页正文全文高转载 2016-02-17 10:24:03 · 274 阅读 · 0 评论 -
Jquery 选择器介绍
1.选择对象 1).基本 ·#id 根据给定的ID匹配一个元素。例如:$("#id") ·element 根据给定的元素名匹配所有元素。例如:$("div") ·.class 根据给定的类匹配元素。例如:$(".style1"); ·* 匹配所有元素。例如:$("*") ·selector1,selector2,selectorN 将每一个选择器匹配到的元素合并后一起返回。例如转载 2016-02-17 10:23:58 · 203 阅读 · 0 评论 -
Python 学习,BMI 体重指数
#!/usr/bin/env python3 # _*_ coding: utf-8 _*_ msg=r''' 欢迎使用BMI测试系统 根据本人曾经发胖的经验对一些数值进行了调整 公共版本: 低于18.5:过轻 18.5-25:正常 25-28:过重 28-32:肥胖 高于32:严重肥胖 私人订制版: 低于17.5:弱不禁风 17.5-23.5:身轻如燕 23.5-27.5:有点累啊 27....原创 2018-08-03 16:15:31 · 3233 阅读 · 0 评论