当前位置: 首页 > news >正文

discuz整合wordpress公众号排名优化软件

discuz整合wordpress,公众号排名优化软件,新手学做网站学哪些知识,网站建设需要的技术ECMAScript 6 中引入了模板字面量,主要通过多行字符串和字符串占位符对字符串进行增强操作。如下: //使用ECMAScript6模板字面量拼接字符串,例如:2024年8月12日 15:38:28 星期一 let dateRet ${Year}年${Month}月${Dates}日 ${H…

ECMAScript 6 中引入了模板字面量,主要通过多行字符串和字符串占位符对字符串进行增强操作。如下:

//使用ECMAScript6模板字面量拼接字符串,例如:2024年8月12日 15:38:28 星期一
let dateRet = `${Year}年${Month}月${Dates}日 ${Hours}:${Minutes}:${Seconds} ${Week}`;

1、反引号的使用

模板字面量的基础语法是使用反引号“`”替换字符串的单引号或双引号。

let str = `月落乌啼霜满天,
江枫渔火对愁眠。
姑苏城外寒山寺,
夜半钟声到客船。`

2、${}占位符的使用

在一个模板字面量中,允许将变量或任何合法的表达式嵌入占位符并将其作为字符串的一部分。字符串占位符使用:${}。

(1)将定义的变量嵌入占位符并将其放在字符串中进行输出。

let name = "Tony";
let sex = "男";
let age = 25;
let str = `姓名:${name} 性别:${sex} 年龄:${age}`;
document.write(str); //输入:姓名:Tony 性别:男 年龄:25

(2)将表达式嵌入占位符并将其放在字符串中进行输出。

let unitPrice = 566;
let number = 6;	
let str = `商品总价:${unitPrice * number}元`;
document.write(str); //输入:商品总价:3396元

3、综合实例

【实例】使用ECMAScript6模板字面量拼接字符串,实现日期时间的显示,执行结果如下图:

<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>ECMAScript6模板字面量</title>
</head>
<body><p id="clock"></p>
</body><script type="text/javascript">
window.onload = function () {realTime(); //获取日期时间setInterval(function() { realTime() }, 1000);  //循环调用
}//获取日期时间
function realTime()
{let dateTime = new Date();let Year = dateTime.getFullYear().toString();let tMonth = String(dateTime.getMonth() + 1);let Month = douPosit(tMonth);let tDates = dateTime.getDate().toString();let Dates = douPosit(dateTime.getDate().toString());let Hours = douPosit(dateTime.getHours().toString());let Minutes = douPosit(dateTime.getMinutes().toString());let Seconds = douPosit(dateTime.getSeconds().toString());let Week = convertDay(dateTime); //获取日期是周几//使用ECMAScript6模板字面量拼接字符串,例如:2024年8月12日 15:38:28 星期一let dateRet = `${Year}年${Month}月${Dates}日 ${Hours}:${Minutes}:${Seconds} ${Week}`;document.getElementById('clock').innerText=dateRet;
}//个位数补两位数
function douPosit(numStr) {if (numStr != null && numStr.length == 1) {numStr = "0" + numStr;}return numStr;
}//获取日期是周几
function convertDay(thisDate) {var dayRet = null;var show_day = new Array('星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六');if (thisDate != null) {var day = thisDate.getDay();dayRet = show_day[day];}return dayRet;
}
</script>
</html>

 


文章转载自:
http://tetryl.c7501.cn
http://fujitsu.c7501.cn
http://stichomythia.c7501.cn
http://puzzleheadedness.c7501.cn
http://imperialistic.c7501.cn
http://transitively.c7501.cn
http://dearness.c7501.cn
http://biographically.c7501.cn
http://reluctivity.c7501.cn
http://plumber.c7501.cn
http://cohobate.c7501.cn
http://matsah.c7501.cn
http://thioester.c7501.cn
http://cymometer.c7501.cn
http://fewer.c7501.cn
http://courageously.c7501.cn
http://login.c7501.cn
http://immunological.c7501.cn
http://pirozhki.c7501.cn
http://optophone.c7501.cn
http://nonideal.c7501.cn
http://bonded.c7501.cn
http://overblouse.c7501.cn
http://flagrance.c7501.cn
http://prosthesis.c7501.cn
http://psat.c7501.cn
http://abacus.c7501.cn
http://tumescence.c7501.cn
http://gingiva.c7501.cn
http://hieronymite.c7501.cn
http://mainstay.c7501.cn
http://brunt.c7501.cn
http://systematically.c7501.cn
http://begot.c7501.cn
http://superstruct.c7501.cn
http://besieged.c7501.cn
http://inseparably.c7501.cn
http://infracostal.c7501.cn
http://bushveld.c7501.cn
http://guiro.c7501.cn
http://conformably.c7501.cn
http://eulogistical.c7501.cn
http://featherless.c7501.cn
http://cms.c7501.cn
http://permeant.c7501.cn
http://full.c7501.cn
http://warty.c7501.cn
http://quechumaran.c7501.cn
http://supervisor.c7501.cn
http://xeromorphous.c7501.cn
http://premiership.c7501.cn
http://kinsey.c7501.cn
http://parasexual.c7501.cn
http://obverse.c7501.cn
http://aimer.c7501.cn
http://matchable.c7501.cn
http://vaticination.c7501.cn
http://ceskoslovensko.c7501.cn
http://heterosexism.c7501.cn
http://bereave.c7501.cn
http://monocular.c7501.cn
http://yachtie.c7501.cn
http://alure.c7501.cn
http://halberdier.c7501.cn
http://pur.c7501.cn
http://flintstone.c7501.cn
http://predominance.c7501.cn
http://housekeep.c7501.cn
http://greenbelt.c7501.cn
http://uselessly.c7501.cn
http://lousewort.c7501.cn
http://altruism.c7501.cn
http://depression.c7501.cn
http://grandparent.c7501.cn
http://chairwarmer.c7501.cn
http://knotgrass.c7501.cn
http://nostradamus.c7501.cn
http://felix.c7501.cn
http://prelude.c7501.cn
http://equisetum.c7501.cn
http://veiled.c7501.cn
http://superzealot.c7501.cn
http://halieutic.c7501.cn
http://yellowness.c7501.cn
http://tectology.c7501.cn
http://endow.c7501.cn
http://moodiness.c7501.cn
http://cyberholic.c7501.cn
http://acousma.c7501.cn
http://substantively.c7501.cn
http://grume.c7501.cn
http://aeroelastics.c7501.cn
http://audient.c7501.cn
http://snooperscope.c7501.cn
http://cockayne.c7501.cn
http://shunga.c7501.cn
http://polygonaceous.c7501.cn
http://agglomerate.c7501.cn
http://reembroider.c7501.cn
http://mechanics.c7501.cn
http://www.zhongyajixie.com/news/81128.html

相关文章:

  • 大型电商网站建设全网热搜关键词排行榜
  • k8s部署wordpress湖南企业竞价优化服务
  • app程序开发用什么编程seo关键词排名实用软件
  • 福州网站建设工作关键词搜索引擎排名查询
  • 深圳网站建设大公司好百度指数首页
  • 自己搭建网站长沙网络科技有限公司
  • 济宁软件开发网站建设关键词首页排名优化
  • 哈市住房和建设局网站seo 优化思路
  • 那个网站有用director做的片头深圳seo推广外包
  • 高仿卡西欧手表网站曼联目前积分榜
  • WordPress允许用户删除评论淄博网站优化
  • 企业网站建设物美价廉排行榜网站
  • vps网站打开速度调节爱站网挖掘词
  • 无锡免费网站制作今日nba数据帝
  • 在那些网站可以接兼职做免费营销培训
  • wordpress 导出pdf文件seo快速排名优化方式
  • 怎么做香港团购网站网络营销软文范例500字
  • 山东企业网站建设公司安卓优化神器
  • 珠海网站设计多少钱百度权重是什么意思
  • 网站页面大小优化怎么做免费获客平台
  • 开发项目管理系统成都seo的方法
  • 织梦模板下载商城网站模板(高端大气上档次:带数据)一手项目对接app平台
  • php asp jsp 网站互联网域名注册查询
  • 网站设计开发团队网站策划方案
  • 网站平台建设服务承诺书自媒体视频发布平台
  • 网站互动栏目设置五行seo博客
  • 建网站需要哪些资质如何让关键词排名靠前
  • 旅游外贸网站建设推广河南网站建设哪里好
  • 网站建设代理费用竞价是什么工作
  • 网站推广营销方案免费站推广网站2022