沪ICP备16003146号-2
沪公网安备 31010702004922号
萌ICP备20238488号
网站已运行 8 年 99 天 9 小时 0 分
3 online · 59 ms
Tag
🔖JQuery
7篇





2年前 · 烂笔头



2年前 · 烂笔头
结果显示123536.8546 转换为越南盾---> 123.536,85 ₫
6536.846 转换为人民币---> ¥6,536.85
JavaScript代码// 转换为越南盾
function numToVnFormatter(s) {
var persianDecimal = new Intl.NumberFormat("vi-VN",
//转换为人民币
function numToCnFormatter(s) {
var persianDecimal = new Intl.NumberFormat("zh
2年前 · 烂笔头
JavaScript代码function addChineseUnit (number, decimalDigit) {
var temp1 = number.toString();
var temp2 = '';
if(temp1.substring(0, 1) === "-")
decimalDigit = decimalDigit == null ? 2 : decimalDigit;
var integer = Math.floor(number);
var digit = getDigit(integer);
2年前 · 烂笔头
javascript代码function guid () {
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c)
去除横线function guidShort ()
显示结果UUID完整:4915d2f4-2e83-47d6-bc76-e321caeff812
UUID不含-:f5e53a50fda8-4c8d-a4fb-04821ac932d0
完整Demo<!doctype html>
<html>
<head>
<meta charse
2年前 · 烂笔头
javascript代码function getDate(timezone)
调用方法getDate(-6);
getDate(8);
getDate(9);
显示结果当前时间:Mon Dec 12 2022 22:39:53
时区为-6的时间:Mon Dec 12 2022 08:39:53
时区为+8的时间:Mon Dec 12 2022 22:39:53
时区为+9的时间:Mon Dec 12 2022 23:39:53
完整Demo<!doctype html>
<html>
<head>
<meta charset="UTF-8&
2年前 · 烂笔头