- 博客(35)
- 收藏
- 关注
转载 ajax上传图片
<!DOCTYPE html><html> <head> <meta charset="utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <title>Page T...
2019-01-25 20:33:00
108
转载 jQuery中的class操作
var box = $('div'); $('button').eq(0).click(function() { //给某一个元素添加类 box.addClass('bgr'); }); $('button')....
2019-01-21 14:11:00
108
转载 判断radio选中
$('input:radio[name="sex"]:checked')转载于:https://www.cnblogs.com/yg-home/p/10297902.html
2019-01-21 11:31:00
130
转载 if判断null undefined等
<!DOCTYPE html><html> <head> <meta charset="utf-8"> <title></title> <script> let a = ''; ...
2019-01-13 09:41:00
239
转载 ajax2.0
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta htt...
2019-01-11 20:50:00
89
转载 原生xhr
<!DOCTYPE html><html><head><meta charset="utf-8"><script>function loadXMLDoc(){ var xmlhttp; if (window.XMLHttpRequest) { // I...
2019-01-11 16:46:00
103
转载 input placeholder属性 样式修改(颜色,大小,位置)
<!DOCTYPE html><html><head> <meta charset="utf-8"> <title></title> <style> input::-webkit-input-placeholder { /*...
2019-01-07 19:59:00
175
转载 localStorage
//localStorage.setItem----存入本地存储 可以存储5M,可以用于避免标签中存值localStorage.setItem()//自定义属性 data-//未来元素 在非未来元素上用on追加绑定事件转载于:https://www.cnblogs.com/yg-home/p/10101109.html...
2018-12-11 11:19:00
106
转载 解决ios和安卓选择时间出现NAN
//解决ios和安卓选择时间出现NANlet datestr = "2018-12-10 20:13:13";console.log(new Date(datestr.replace(/-/g, "/")).valueOf());转载于:https://www.cnblogs.com/yg-home/p/10101098.html...
2018-12-11 11:17:00
117
转载 销毁json属性
<!doctype html><html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> ...
2018-12-03 16:39:00
101
转载 meta标签
<meta name="viewport" content="width=device-width, initial-scale=1.0,minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"> <meta name="apple-mobile-web-app-capable"...
2018-11-14 20:21:00
58
转载 video标签的使用
禁止下载将属性改为controls="true" controlslist="nodownload"转载于:https://www.cnblogs.com/yg-home/p/9942665.html
2018-11-11 17:16:00
117
转载 jquery-ui时间选择插件
<!doctype html><html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> ...
2018-11-10 20:25:00
81
转载 java 当年当月当天的时间戳
Calendar isthismonth = Calendar.getInstance(); isthismonth.add(Calendar.MONTH, 1); isthismonth.set(Calendar.DAY_OF_MONTH, 1); isthismonth.set(Calendar.HOUR_OF...
2018-11-07 17:34:00
147
转载 拼接json(只能用双引号的情况下)
<!DOCTYPE html><html> <head lang="en"> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1"> ...
2018-11-07 15:25:00
89
转载 表单序列化后转成json对象
<!DOCTYPE html><html> <head lang="en"> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1"> ...
2018-11-07 10:08:00
81
转载 多出来的字处理方式
overflow: hidden; white-space: nowrap; text-overflow: ellipsis;display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 3; overflow: hidden;参数2控制行数转载于:...
2018-11-05 10:53:00
104
转载 mui的日期选择插件
<!DOCTYPE html><html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1"> <ti...
2018-11-02 16:34:00
185
转载 removeAttr() 方法从被选元素移除一个或多个属性。
<!DOCTYPE html><html><head><meta charset="utf-8"><title>菜鸟教程(runoob.com)</title><script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.m...
2018-10-31 09:27:00
1741
转载 往对象里面每一条数据增加一组键值
1 $.each(json, function (k, v) {2 v.typeID = 1;3});直接循环后给想插入的键名赋值即可转载于:https://www.cnblogs.com/yg-home/p/9877018.html
2018-10-30 15:20:00
761
转载 多条件对象数组排序(合理更改减数与被减数得出降序与升序)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8" /> 5 <meta name="viewport" content="width=device-width, initial-scale=1">...
2018-10-30 15:18:00
99
转载 单条件对象数组排序(合理更改减数与被减数得出降序与升序)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8" /> 5 <meta name="viewport" content="width=device-width, initial-scale=1">...
2018-10-30 15:16:00
68
转载 普通数组排序 默认升序,回调函数处理后为降序
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8" /> 5 <meta name="viewport" content="width=device-width, initial-scale=1">...
2018-10-30 15:11:00
155
转载 同上一篇,但只适用于键名不同的json
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8" /> 5 <meta name="viewport" content="width=device-width, initial-scale=1">...
2018-10-30 11:45:00
59
转载 把两个一模一样的json合并成为一个(适用于任何json)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8" /> 5 <meta name="viewport" content="width=device-width, initial-scale=1">...
2018-10-30 11:43:00
440
转载 计算地球上两坐标的距离
1 <!DOCTYPE html> 2 <html> 3 4 <head> 5 <title></title> 6 <meta charset="utf-8"> 7 </head> 8 9 <body>10 <scri...
2018-10-27 22:53:00
149
转载 地图计算两点距离
1 //高德地图计算两点距离2 function getBothDistance(orderid) {3 var p1 = [lng, lat];4 var p2 = [lng, lat];5 var yg = AMap.GeometryUtil.distance(p1, p2);6 alert("本单距离您约为" + (yg / ...
2018-10-23 10:44:00
391
转载 地图定位
1 //获取本人当前位置 2 function getCurrentPosition() { 3 var map = new AMap.Map("container", { 4 resizeEnable: true 5 }); 6 7 map.plugin('AMap.Geolocation', function()...
2018-10-23 10:25:00
79
转载 linux jdk环境变量
JAVA_HOME=/javaCLASSPATH=$JAVA_HOME/lib/PATH=$PATH:$JAVA_HOME/binexport PATH JAVA_HOME CLASSPATH转载于:https://www.cnblogs.com/yg-home/p/9834806.html
2018-10-23 09:34:00
77
转载 linux下mysql的配置文件
[client]default-character-set = utf8mb4[mysql]socket = /var/lib/mysql/mysql.sockdefault-character-set = utf8mb4[mysqld]skip-name-resolveport = 3306socket = /var/lib/mysql/mysql.sockbasedir=/u...
2018-10-23 09:34:00
157
转载 ajax请求
<!DOCTYPE html><html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1"> <ti...
2018-10-22 20:05:00
78
转载 随机组合字母和数字
<!DOCTYPE html><html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1"> <ti...
2018-10-22 19:54:00
200
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人