前端

React Native学习之搭建开发环境

React Native学习之搭建开发环境

安装软件 C++环境 编译node.js的C++模块需要用到。 Visual C++ Redistributable Packages for Visual Studio 2013:https://www.microsoft.com/en-gb/download/details.aspx?id=40

Joe.Ye Joe.Ye 2023-02-25
0 0 0
前端QRCode.js生成二维码插件

前端QRCode.js生成二维码插件

本文用于推荐一款很好用的二维码生成插件QRCode.js,测试使用方便且简单。 其实官方就有很好的文档,这里只是做一个我工作的记录和总结。 介绍 Github:https://github.com/davidshimjs/qrcodejs 主要使用canvas实现 原生代码,无需依赖 兼容性也很

Joe.Ye Joe.Ye 2023-02-25
0 0 0
NodeJS crypto加密

NodeJS crypto加密

加密 const crypto = require('crypto'); let sha256 = crypto.createHash("sha256") let password = "admin" let newPwd = sha25

Joe.Ye Joe.Ye 2023-02-25
0 0 0
JS处理数据四舍五入tofixed与round的区别

JS处理数据四舍五入tofixed与round的区别

tofixed方法 toFixed() 方法可把 Number 四舍五入为指定小数位数的数字。例如将数据Num保留2位小数,则表示为:toFixed(Num)。但是其四舍五入的规则与数学中的规则不同,使用的是银行家舍入规则,银行家舍入:所谓银行家舍入法,其实质是一种四舍六入五取偶(又称四舍六入五留双

Joe.Ye Joe.Ye 2023-02-25
0 0 0
JS使用占位符替换字符串

JS使用占位符替换字符串

JS使用占位符替换字符串是一个ES6中的模版字符串语法。在 {% raw %}{% endraw %} 中使用 ${} var a = 5 var b = 10 console.log(`Fifteen is ${a + b} and not ${2 * a + b}.`) Fifteen is

Joe.Ye Joe.Ye 2023-02-25
0 0 0
CSS设置select或option文本居中居右对齐

CSS设置select或option文本居中居右对齐

目前在select或option元素中使用style或css: text-align,发现根本不起作用: select { text-align: right } option { text-align: right } 似乎在所有基于webkit的浏览器没有对select实现text-align

Joe.Ye Joe.Ye 2023-02-25
0 0 0
Flexbox布局之对齐方式

Flexbox布局之对齐方式

display display: flex | inline-flex; 是否使用flexbox方式布局 该属性是定义在弹性容器上的;根据其值决定是内联还是块布局。这时它的直属下级将会变成flex文档流。 flexDirection flexDirection: row | row-reve

Joe.Ye Joe.Ye 2023-02-25
0 0 0
JS跳转阻止后退至上一页面,没有历史记录

JS跳转阻止后退至上一页面,没有历史记录

window.location.replace window.location.replace('要转向的页面') //不会有历史记录 let backLen = history.length history.forward() history.go(-backLen) //

Joe.Ye Joe.Ye 2023-02-25
0 0 0
H5中localStorage和sessionStorage区别

H5中localStorage和sessionStorage区别

基本介绍 localStorage和sessionStorage都是用来存储客户端临时信息的对象。只能存储字符串类型的对象(虽然规范中可以存储其他原生类型的对象,但是目前为止没有浏览器对其进行实现)。 localStorage生命周期是永久,这意味着除非用户显示在浏览器提供的UI上清除localSt

Joe.Ye Joe.Ye 2023-02-25
0 0 0
HTML5触摸事件(touchstart、touchmove和touchend)

HTML5触摸事件(touchstart、touchmove和touchend)

touchstart事件:当手指触摸屏幕时候触发,即使已经有一个手指放在屏幕上也会触发 touchmove事件:当手指在屏幕上滑动的时候连续地触发。在这个事件发生期间,调用preventDefault()事件可以阻止滚动 touchend事件:当手指从屏幕上离开的时候触发 touchcancel事件

Joe.Ye Joe.Ye 2023-02-25
0 0 0
Html input属性为number,maxlength不起作用问题解决

Html input属性为number,maxlength不起作用问题解决

问题描述 <input type="text" maxlength="5" /> 效果ok,当 <input type="number" maxlength="5" /> 时maxlengt

Joe.Ye Joe.Ye 2023-02-25
0 0 0
iframe实现Html嵌入Html

iframe实现Html嵌入Html

iframe实现Html嵌入Html <div class="container"> <div style="text-align: center;"> <iframe src="{{ payment_url

Joe.Ye Joe.Ye 2023-02-25
0 0 0
Thymeleaf字符串拼接

Thymeleaf字符串拼接

Thymeleaf字符串拼接:用+符号,也可以用|符号 th:text字符串拼接 user.name从后台传来的变量,${user.name}获得变量值。 文本连接 若user.name="张三",解析结果为:<span>Welcome,张三</span&gt

Joe.Ye Joe.Ye 2023-02-25
0 0 0
Hexo模板

Hexo模板

hexo-theme-hiker Github:https://github.com/iTimeTraveler/hexo-theme-hiker Demo:https://itimetraveler.github.io/hexo-theme-hiker/ 官网:http://itimetrave

Joe.Ye Joe.Ye 2023-02-25
0 0 1
四个好看的CSS样式表格

四个好看的CSS样式表格

参考:https://www.textfixer.com/tutorials/css-tables.php 单像素边框CSS表格 这是一个很常用的表格样式。 <!-- CSS goes in the document HEAD or added to your external style

Joe.Ye Joe.Ye 2023-02-23
0 0 0
1 16 17 18 19 20