
前端
月慕向阳
....
展开
-
国密sm2加密算法 前后端加密实现
国密sm2加密算法,前后端实现原创 2022-07-07 15:19:39 · 4392 阅读 · 6 评论 -
使用循环引用对JavaScript对象进行Stringify(转换为JSON)
循环使用的深层副本可以安全地通过JSON.stringify传递。请享用!https://github.com/douglascrockford/JSON-jscycle.js:此文件包含两个函数JSON.decycle和JSON.retrocycle,这使您可以在JSON中编码循环结构和dag,然后对其进行恢复。ES5未提供此功能。JSONPath用于表示链接。...原创 2020-01-08 14:01:03 · 924 阅读 · 1 评论 -
js对Cookie的操作
//cookie相关操作,不需要dom加载完成后运行,因此单独写//设置cookiefunction setCookie(name,value){ if(!name||!value) return; var Days = 30;//默认30天 var exp = new Date(); exp.setTime(exp.getTime() + Days*24*...原创 2019-05-31 10:27:22 · 6660 阅读 · 0 评论 -
jquery+css实现轮播效果
<style type="text/css">.slideBox { width: 100%; height: 200px; border: 1px #c0c0c0 solid; overflow: hidden}.slideBox img { width: 100%; height: 200px; border: 0;}.slideBox li { l...原创 2019-05-31 10:49:06 · 255 阅读 · 0 评论 -
ajax不通过页面表单来上传图片,通过js的FormData
关键代码取input框里面的文件需要通过$("input[type='file']")[0].files[0]来获取 (这是jquery获取方法)原生js获取方法是var file = document.querySelector('input[type=file]').files[0];//IE10以下不支持 注意上传文件必须添加 processDa...原创 2019-06-14 08:42:07 · 1008 阅读 · 0 评论 -
整理的一些js方法
JSON.stringify(obj); //将JSON对象obj转化为JSON字符JSON.parse(str); //由JSON字符串str转换为JSON对象表单元素转json对象 var arry = $("#form").serializeArray();//序列化表单 var obj = {};//分配内存空间 for (var i =...原创 2019-06-14 10:03:52 · 260 阅读 · 0 评论 -
js 判断当前页面是否被浏览,更换title
https://blog.youkuaiyun.com/oulihong123/article/details/53693298转载 2019-06-18 16:43:22 · 398 阅读 · 0 评论 -
在html输入框中响应enter键盘------介绍重要的onkeydown方法实现“模糊查找”
转载自csdn排名第一的........https://blog.youkuaiyun.com/stpeace/article/details/50811595<html><body> <input οnkeydοwn="if(event.keyCode==13) {test()}"/> <script>function test(){...转载 2019-08-16 15:47:20 · 297 阅读 · 0 评论 -
上左右的一个iframe布局
index.html<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial...原创 2019-08-16 17:29:12 · 2486 阅读 · 0 评论 -
一款比较好用的JS时间控件-laydate
一款比较好用的JS时间控件-laydate 官方讲解:http://laydate.layui.com/ 具体的内容请看官方讲解,此处仅说名应用: 1、在jsp或html或其他中引入laydate.js <script src="……/laydate/laydate.js" charset="UTF-8"></script> 2、在inpu...原创 2018-12-19 10:34:07 · 264 阅读 · 0 评论 -
jquery上传文件进度条
首先引入需要的js css用bootstrap进度条<link rel="stylesheet" href="js/bootstrap/bootstrap.min.css" ><script type="text/javascript" src="js/jquery-3.2.1.min.js"></script><script type="...原创 2019-05-06 08:10:26 · 3223 阅读 · 0 评论 -
模态框代替alert、confirm
<link rel="stylesheet" href="../css/global-theme/bootstrap/3.0.1/css/bootstrap.css"><script src="../css/global-theme/bootstrap/3.0.1/js/bootstrap.min.js"></script><!-- 模态框(原创 2018-12-05 14:18:26 · 815 阅读 · 1 评论 -
Echart使用,看了就会的
最简单的demo参照官网http://echarts.baidu.com/tutorial.html#5%20%E5%88%86%E9%92%9F%E4%B8%8A%E6%89%8B%20EChartsjquery加载:<script type="text/javascript" src="js/echarts.min.js"></script><scri...转载 2018-12-05 18:26:16 · 27429 阅读 · 0 评论 -
页面密码框替代方式,appscan已解密的登录请求
页面用下面代码替代type=password <input type="text" id="password1" style="width:146px;height:18px;" onkeypress="javascript:hiddenPass(event)" onkeyup="this.value=this.value.replace(/./g,'*');"/>原创 2018-12-13 15:36:32 · 1975 阅读 · 3 评论 -
div超出部分省略,显示...
<div style="cursor:pointer;overflow: hidden; white-space: nowrap; text-overflow: ellipsis;height: 40px;width: 219px;" title="这是title"> <span style="width:219px"> 这是内容 ...原创 2018-12-17 19:23:17 · 1384 阅读 · 2 评论 -
HTTP状态码的含义
4xx(请求错误)这些状态码表示请求可能出错,妨碍了服务器的处理。 400(错误请求) 服务器不理解请求的语法。 401(未授权) 请求要求身份验证。对于登录后请求的网页,服务器可能返回此响应。 403(禁止) 服务器拒绝请求。如果您在 Googlebot 尝试抓取您网站上的...原创 2018-12-28 16:06:40 · 144 阅读 · 0 评论 -
表头固定
https://github.com/KenyeeC/eleFixed转载 2018-12-18 10:49:27 · 284 阅读 · 0 评论 -
ajax提交带文件的表单
var form = new FormData(document.getElementById("uploadForm")); $.ajax({ type:'post', url:$("#uploadForm").attr("action"), data:form, async: false,//默认true,false同步提交 processData:fals...原创 2019-04-23 14:17:09 · 1169 阅读 · 0 评论 -
js倒计时跳转页面
<script type="text/javascript"> var t = 3;//设定跳转的时间 var timer =setInterval("refer()", 1000); //启动1秒定时 function refer() { if (t == 0) { clearInterval(timer); location = "/login.do"; /...原创 2019-04-19 09:16:30 · 1967 阅读 · 0 评论 -
鼠标移入查看缩略图详细图片
<div> <img src="img/2.jpg" alt="..." id="img2"/><script type="text/javascript">$(function(){ $("img[id^='img']").mouseover(function(e){ //鼠标移入 va原创 2018-09-29 17:35:39 · 992 阅读 · 1 评论