<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[Bo-Blog的另类集散地]]></title> 
<link>https://bb.y48.net/index.php</link> 
<description><![CDATA[自由的翱翔]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[Bo-Blog的另类集散地]]></copyright>
<item>
<link>https://bb.y48.net/read.php?15</link>
<title><![CDATA[Bo-Blog: [banana]-1.0.0 20240716 beta 更新]]></title> 
<author>james &lt;admin@yourname.com&gt;</author>
<category><![CDATA[波波]]></category>
<pubDate>Thu, 18 Jul 2024 10:56:53 +0000</pubDate> 
<guid>https://bb.y48.net/read.php?15</guid> 
<description>
<![CDATA[ 
	<p>&nbsp;</p><div class="markdown-body my-3" data-view-component="true" data-test-selector="body-content" data-pjax="true"><p><strong>程序代号：</strong>[banana]<br/><strong>版本号:</strong> 1.0.0<br/><strong>更新内容：<span style="color: #e03e2d;">(2.1.1.3626.3 到现在所有更新内容)</span></strong></p><p>代码下载地址：https://github.com/guoqiang5277/boblog/releases/tag/v1.0.0</p><p>问题报告地址：https://github.com/guoqiang5277/boblog/issues</p><p>本程序，基于 Bo-Blog 2.1.1 Release (2.1.1.3626.3)，</p><ol><li>[fix] 修复高版本mysql数据库，会出现安装报错</li><li>[fix] 兼容php 7.x</li><li>[fix] 处理TAG页面因为语法不严谨导致显示错误</li><li>[fix] 修复程序的兼容性问题</li><li>[fix] 修复验证码不能用的bug</li><li>[adjust] 更新缓存连接和程序连接为github源码连接，问题上报地址为github issue地址</li><li>[adjust] 文件编码修正为UTF-8编码</li><li>[fix] 修正工信备案链接无法正常显示和地址错误</li><li>[fix] 修正中文乱码</li><li>[fix] 修正数据库调用方式错误，导致无法添加自定义页面</li><li>[fix] 增加非空检测，处理php7.2以上版本会报警告</li><li>[adjust] 修改换行符 CRLF -&gt; LF</li><li>[adjust] 修改英文月份为中文</li><li>[add] 添加对mysql服务器端口号的支持。</li><li>[adjust] 移除安装界面的越南语</li><li>[fix] 修复语言设置页面，不能正常显示当前语言，前台语言和后台语言设置分开</li><li>[fix] UBB编辑器，左侧标题栏显示不全会换行</li><li>[adjust] 编辑器自动从文件夹中读取</li><li>[fix] 修正在高版本php的时候，数据为空会导致异常</li><li>[adjust] 数据库默认编码为utf8mb4，兼容enjoy表情符号</li><li>[add] 新增tinyMCE 7.0 编辑器，(旧版本的编辑器在chrome中无法使用)</li><li>[adjust] 上传文件类型，删除swf格式，添加几个视频格式</li><li>[fix] 修正上传标签语法错误，少了一个td</li><li>[adjust] 移除用不到并且也没有添加完整的两个编辑器</li><li>[fix] 修正文件上传页面，筛选的条件会被刷掉的bug</li><li>[fix] 修正图片预览页面，显示不全的bug。</li><li>[fix] 修正文件上传框，底部显示不全。</li><li>[fix] 修正图片预览框会错位的问题</li><li>[fix] 修正在生成OR查询和AND使用的时候，会导致查询失败</li><li>[fix] 修正在生成组件的时候，多个标签会使用同一个id的Bug，不符合Html规范</li><li>[add] 新增程序名称为banana，程序采用新的版本号，原bo-blog不变</li></ol><p>标识说明<br/><strong>[add] 新增</strong><br/><strong>[fix] 修复</strong><br/><strong>[adjust] 调整</strong></p></div><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><br/>Tags - <a href="https://bb.y48.net/tag.php?tag=boblog" rel="tag">boblog</a> , <a href="https://bb.y48.net/tag.php?tag=%25E6%259B%25B4%25E6%2596%25B0" rel="tag">更新</a>
]]>
</description>
</item><item>
<link>https://bb.y48.net/read.php?14</link>
<title><![CDATA[[2024-05-18] 更新网站https]]></title> 
<author>james &lt;admin@yourname.com&gt;</author>
<category><![CDATA[波波]]></category>
<pubDate>Sat, 18 May 2024 09:59:35 +0000</pubDate> 
<guid>https://bb.y48.net/read.php?14</guid> 
<description>
<![CDATA[ 
	<div>// 更新内容</div><div>http 更新为https</div><div><br /></div><div>更新方式：</div><div>1. 使用宝塔，一键操作更新为https</div><div>2. 登录bo-blog 后台，</div><div>&nbsp;&nbsp;&nbsp;&nbsp;常规管理 --&gt; blog 设置&nbsp;&nbsp;</div><div>&nbsp;&nbsp;&nbsp;&nbsp;将 URL 路径 和 URL图标 里面的 http 修改为https </div><div><br /></div><div>3. 数据维护，刷新缓存，即可</div><br/>Tags - <a href="https://bb.y48.net/tag.php?tag=https" rel="tag">https</a>
]]>
</description>
</item><item>
<link>https://bb.y48.net/read.php?13</link>
<title><![CDATA[更新计划]]></title> 
<author>james &lt;admin@yourname.com&gt;</author>
<category><![CDATA[波波]]></category>
<pubDate>Thu, 21 Dec 2023 13:12:31 +0000</pubDate> 
<guid>https://bb.y48.net/read.php?13</guid> 
<description>
<![CDATA[ 
	<div><strong>记录一些未来可能的计划</strong></div><div><span style="color: #ff0000">(2023-12-21更新)</span></div><div>1. php 兼容到8.0/8.1 <br /></div><div>2. 日常维护，处理自己碰到的问题点</div>
]]>
</description>
</item><item>
<link>https://bb.y48.net/read.php?12</link>
<title><![CDATA[波波的一些更新]]></title> 
<author>james &lt;admin@yourname.com&gt;</author>
<category><![CDATA[波波]]></category>
<pubDate>Thu, 21 Dec 2023 12:13:49 +0000</pubDate> 
<guid>https://bb.y48.net/read.php?12</guid> 
<description>
<![CDATA[ 
	<div>源码下载： https://github.com/guoqiang5277/boblog <br /></div><div>报问题地址: https://github.com/guoqiang5277/boblog/issues<br /></div><div><span style="color: #ff0000">(看到问题后不定期更新)</span></div><div><br /></div><div><br /></div><div><strong>更新记录：</strong><br /></div><div><br /></div><div><span style="color: #ff0000">2023-12-21：</span></div><div>1. [修正] 修正 php7.4版本，部分代码不兼容的bug，会导致报警告</div><div>2. [修正] 部分页面为GBK，全部修改为 UTF-8编码</div><div>3. [修正] php7.2版本以上，在查询数据库结构Array为空的时候，会报警告，</div><div>4. [修正] 默认模板无法正常显示底部信息</div><div>5. [修正] 工信备案地址错误，更新到最新<br /></div><div><div>6. [修正] 修正数据库访问的时候，直接调用底层导致无法访问</div>7. [修正] 创建页面的时候报错</div><div><br /></div>
]]>
</description>
</item><item>
<link>https://bb.y48.net/read.php?10</link>
<title><![CDATA[这是个测试页面]]></title> 
<author>james &lt;admin@yourname.com&gt;</author>
<category><![CDATA[默认分类]]></category>
<pubDate>Mon, 16 Aug 2021 06:42:09 +0000</pubDate> 
<guid>https://bb.y48.net/read.php?10</guid> 
<description>
<![CDATA[ 
	测试TAG专用<br/>Tags - <a href="https://bb.y48.net/tag.php?tag=%25E6%25B5%258B%25E8%25AF%2595tag" rel="tag">测试tag</a> , <a href="https://bb.y48.net/tag.php?tag=%25E6%25B5%258B%25E8%25AF%2595tag1" rel="tag">测试tag1</a> , <a href="https://bb.y48.net/tag.php?tag=%25E6%25B5%258B%25E8%25AF%2595tag2" rel="tag">测试tag2</a> , <a href="https://bb.y48.net/tag.php?tag=%25E6%25B5%258B%25E8%25AF%2595tag3" rel="tag">测试tag3</a> , <a href="https://bb.y48.net/tag.php?tag=%25E6%25B5%258B%25E8%25AF%2595tag4" rel="tag">测试tag4</a> , <a href="https://bb.y48.net/tag.php?tag=%25E6%25B5%258B%25E8%25AF%2595tag5" rel="tag">测试tag5</a> , <a href="https://bb.y48.net/tag.php?tag=%25E6%25B5%258B%25E8%25AF%2595tag6" rel="tag">测试tag6</a> , <a href="https://bb.y48.net/tag.php?tag=%25E6%25B5%258B%25E8%25AF%2595tag7" rel="tag">测试tag7</a>
]]>
</description>
</item><item>
<link>https://bb.y48.net/read.php?9</link>
<title><![CDATA[新的一天]]></title> 
<author>james &lt;admin@yourname.com&gt;</author>
<category><![CDATA[日记]]></category>
<pubDate>Wed, 28 Jul 2021 02:41:36 +0000</pubDate> 
<guid>https://bb.y48.net/read.php?9</guid> 
<description>
<![CDATA[ 
	最近一段时间，尝试了很多blog的，一直不尽人意。<br/>boblog的彻底死了，复活无望。使用的这个感觉有点旧，很多想要的东西都没有。<br/>前一段时间，工作的事情太忙了。<br/>最近好了一些，再看core方面的书籍。<br/>后面考虑重新写一个简单的blog，可能采用的.net5.0/6.0+blazor,可能不使用UI框架，用最简单的css，能用原生的就尽量用原生的。<br/>
]]>
</description>
</item><item>
<link>https://bb.y48.net/read.php?8</link>
<title><![CDATA[波波兼容php7.x的测试]]></title> 
<author>james &lt;admin@yourname.com&gt;</author>
<category><![CDATA[波波]]></category>
<pubDate>Tue, 26 May 2020 08:35:59 +0000</pubDate> 
<guid>https://bb.y48.net/read.php?8</guid> 
<description>
<![CDATA[ 
	最近针对波波的兼容性做了修改，<br/>但是发现，早期的php版本，语法要求比较放荡，没有做严格要求。从7.x后，对语法要求很严格，才导致了很多功能失效。<br/>总结了一下。<br/>报错：Warning: Illegal string offset 'currentpage' in<br/>原因：早期的波波强制调用不存在的内容，早期的版本会默认为NULL，7.x语法严格，会报错。
]]>
</description>
</item><item>
<link>https://bb.y48.net/read.php?7</link>
<title><![CDATA[今天又做了一些实验]]></title> 
<author>james &lt;admin@yourname.com&gt;</author>
<category><![CDATA[日记]]></category>
<pubDate>Thu, 10 Oct 2019 08:20:36 +0000</pubDate> 
<guid>https://bb.y48.net/read.php?7</guid> 
<description>
<![CDATA[ 
	首先记录一下今天的大概事情经过。<br/>1、今天因为查看了string的用法的时候，http://c.biancheng.net/view/400.html，<br/>&nbsp;&nbsp;&nbsp;&nbsp;发现他们的网站，看起来很舒服，如果用来做笔记的话，应该很不错。<br/>&nbsp;&nbsp;&nbsp;&nbsp;然后就想到了wiki，WordPress之类的。<br/>&nbsp;&nbsp;&nbsp;&nbsp;然后就想到了前段时间，阿里云备案打电话过来问网站的事情。<br/>2、于是乎，产生了一个想法，安装wiki和WordPress试试。<br/>&nbsp;&nbsp;&nbsp;&nbsp;下载好源码，wiki和WordPress的。<br/>3、安装wiki。<br/>&nbsp;&nbsp;&nbsp;&nbsp;安装的时候，发现很多警告，查询了一些方案后，这些可以忽略，然后就过去了。<br/>&nbsp;&nbsp;&nbsp;&nbsp;到了数据库这一步骤，基本上都快中午了，数据库说是mysql 不支持innoDB引擎，建议不要安装，还说让用MariaDB的数据库，然后就搜索和问了很多资料，都说是两个可以共存。<br/>&nbsp;&nbsp;&nbsp;&nbsp; 继续搜资料，说是当前的数据库版本可以支持InnoDB的引擎，然后折腾了一个小时左右，打开了InnoDB的引擎，Wiki成功安装。<br/>&nbsp;&nbsp;&nbsp;&nbsp; 然病卵！！！<br/>&nbsp;&nbsp;&nbsp;&nbsp; 特么的，竟然不会用，折腾了半天，真的不习惯。<br/>4、安装WordPress<br/>&nbsp;&nbsp;&nbsp;&nbsp; 安装比较顺利。<br/>&nbsp;&nbsp;&nbsp;&nbsp; 安装好后，发现皮肤真特么的一个丑，，<br/>&nbsp;&nbsp;&nbsp;&nbsp; 从主题仓库里面，找了半天，没有发现一个好用的。<br/>&nbsp;&nbsp;&nbsp;&nbsp; 百度了一些WordPress主题，有个仿造月光博客的，感觉不错。<br/>&nbsp;&nbsp;&nbsp;&nbsp; 打开月光博客的官网，发现，，，这特么的是用zblog做的，而且还是asp的东西。<br/>5、累瘫了，<br/>&nbsp;&nbsp;&nbsp;&nbsp; 感觉在做一些没有意义的事情，等下也不再想去尝试zblog了。<br/>&nbsp;&nbsp;&nbsp;&nbsp; 还用老老实实的用bo-blog吧。<br/>------------------------------------<br/>折腾来折腾去，感觉还是bo-blog用的最舒心，<br/>但是里面的很多东西都太旧了，而且还有很多问题。<br/>但是里面的东西自己都不是很懂，也不好去修改。<br/>
]]>
</description>
</item><item>
<link>https://bb.y48.net/read.php?6</link>
<title><![CDATA[zigbee_蓝牙_wifi的比较与区别分析]]></title> 
<author>james &lt;admin@yourname.com&gt;</author>
<category><![CDATA[物联网]]></category>
<pubDate>Mon, 29 Apr 2019 03:44:16 +0000</pubDate> 
<guid>https://bb.y48.net/read.php?6</guid> 
<description>
<![CDATA[ 
	 　　现在无线通读热了起来。三个最大的Wifi、ZigBee、蓝牙它们三个始终困惑着我。那么它们三个有什么区别呢？<br/><br/>　　Zigbee 和蓝牙都是一项无线通信技术。ZigBee的传输距离视发射功率而定，有几百到几千米不等，不过传输率却只有250kps的，但是这个只是理论值。一般也就20-30kps.而蓝牙的传输距离仅仅只有10米左右，传输速度是1.8M/s~2.1M/s，zigBee应用于智能家居的比较多，而蓝牙应用于特别短距离的文件传输。<br/>　　ZigBee、WiFi、蓝牙等常用2.4Ghz无线技术的区别<br/><br/>　　社会的不断发展，无线的优点已经逐步显现。如；无线通信覆盖范围大，几乎不受地理环境限制：无线通信可以随时架设，随时增加链路，安装、扩容方便;无线通信可以迅速（数十分钟内）组建起通信链路，实现临时，应急、抗灾通信的目的：而有线通信则有地埂的限制、较长的响应时间。无线通信在可靠性、可用性和抗毁性等方面走出了传统的有线通信方式，尤其在一些特殊的地理环境下，无线比有线方便得多。随着无线通讯的发展及成熟。在工业控制、医疗、汽车电子。都广泛的应用<br/><br/>　　ZigBee、Wi-Fi、蓝牙和几种无线技术的对比如下表所示：<br/><br/>　　zigbee_蓝牙_wifi的比较与区别分析<br/><br/>　　1、WIFI，WIFI是目前应用最广泛的无线通信技术，传输距离在100-300M，速率可达300Mbps，功耗10-50mA。<br/><br/>　　2、Zigbee，传输距离50-300M，速率250kbps，功耗5mA，最大特点是可自组网，网络节点数最大可达65000个。<br/><br/>　　3、蓝牙，传输距离2-30M，速率1Mbps，功耗介于zigbee和WIFI之间。<br/><br/>　　这3种无线技术，从传输距离来说，是WIFI》ZigBee》蓝牙;从功耗来说，是WIFI》蓝牙》ZigBee，后两者仅靠电池供电即可;从传输速率来讲，是WIFI》ZigBee》蓝牙。<br/><br/>　　目前来说，WIFI的优势是应用广泛，已经普及到千家万户。ZigBee的优势是低功耗和自组网;电力载波的优势是传输速率;蓝牙的优势组网简单。然而，这3种技术，也都有各自的不足，没有一种技术能完全满足智能家居的全部要求。<br/>　　ZigBee引领物联网设备大步向前<br/><br/>　　ZigBee基于IEEE802.15.4标准的低功耗局域网协议，是一个开放的无线网络状网络技术。与传统星型、点对点、网状网络采用最低成本节点为所有联网设备提供覆盖的架构不同，ZigBee采用动态、自主的路由协议，基于AODV的路由技术。在AODV中，一个节点需要连接时，则将广播一条路由请求报文，其他节点在路由表中查找，如果有到达目标节点的路由，则向源节点反馈，源节点挑选一条可靠、跳数最小的路线，并存储信息到本地路由表以便用于未来所需，如果一条路由线路失败，节点能够简单的选择另一条替代路由线路。如果源和目的地之间的最短线路由于墙壁或多径干扰而被阻塞，ZigBee能够自适应的找到一条更长但可用的路由线路。这种独特的架构使ZigBee拥有近距离、低复杂度、自组织、低功耗、高数据速率的特点。<br/><br/>　　zigbee_蓝牙_wifi的比较与区别分析<br/>　　ZigBee引领物联网设备大步向前<br/><br/>　　ZigBee基于IEEE802.15.4标准的低功耗局域网协议，是一个开放的无线网络状网络技术。与传统星型、点对点、网状网络采用最低成本节点为所有联网设备提供覆盖的架构不同，ZigBee采用动态、自主的路由协议，基于AODV的路由技术。在AODV中，一个节点需要连接时，则将广播一条路由请求报文，其他节点在路由表中查找，如果有到达目标节点的路由，则向源节点反馈，源节点挑选一条可靠、跳数最小的路线，并存储信息到本地路由表以便用于未来所需，如果一条路由线路失败，节点能够简单的选择另一条替代路由线路。如果源和目的地之间的最短线路由于墙壁或多径干扰而被阻塞，ZigBee能够自适应的找到一条更长但可用的路由线路。这种独特的架构使ZigBee拥有近距离、低复杂度、自组织、低功耗、高数据速率的特点。<br/><br/>　　正因为ZigBee这些特点，使其主要适用于自动控制以及远程控制领域，目的是为了满足小型廉价设备的无线联网和控制，典型应用如无线传感网络，在家庭/商业自动化领域、智慧能源、健康医疗及零售等领域，ZigBee也被证明是可靠的无线网络解决方案。 在开发2.4 GHz ZigBee？无线网络应用时，设计工程师通常会面临系统分割的选择：对ZigBee的连接性及网络处理解决方案而言，最佳的整合层级为何？从效能、功耗及成本的角度来看，何者是最适合的选择——是将2.4 GHz无线收发器及处理核心整合为单芯片解决方案的ZigBee系统单芯片（SoC）比较好？还是具有独立收发器及主处理器的离散式方案较佳？<br/><br/>　　而随着ZigBee在自动化控制、移动互联网络、智能可穿戴设备领域越加频繁的应用，业内对于低耗能传感器及芯片在连通性和兼容性方面有着迫切的要求。对此，ZigBee联盟推出新协议920IP，该标准是全球首个基于互联网通讯协定第6版（IPv6）的无线网格网络（Mesh Networking）解决方案，未来将应用于低耗电量和低成本的家庭能源管理的网格网络及其相关设备中，提升物联网设备的能效和互通性。随着此协议的推出，ZigBee在物联网中的功能逐步完善，物联网设备效能将会极大提高。<br/><br/>　　WiFi后浪拍前浪<br/><br/>　　WIFI是我们常用的无线网络技术，几乎所有的智能手机、平板电脑和笔记本电脑都支持Wifi上网，是当今使用最广的一种无线网络传输技术。目前我们用到的WiFi大多基于IEEE 802.11n无线标准，数据传输速率达到300Mbps，吞吐量接近100M到150M。但是802.11n正逐步退出物联网舞台，新的802.11ac标准正强势杀入WiFi技术市场，应用新标准的WiFi，传输率将增加十倍。<br/><br/>　　802.11ac Wi-Fi技术的理论传输率虽已达Gbit/s的境界，但此一数据指的其实是整体Wi-Fi网络容量，实际上个别Wi-Fi装置所分配到的频宽，很少能达到此一水准。因此，IEEE制定802.11ax的目标，即着重在改善个别装置的联网效能表现，尤其是在同一Wi-Fi网络环境中，同时有许多使用者连结的情况下。<br/><br/>　　zigbee_蓝牙_wifi的比较与区别分析<br/><br/>　　然而，大多数人都在关注802.11ac等新一代WiFi技术的时候，另一种更快的短距离无线传输技术WiGig正在快速的崛起。如果将所有的短距离通信技术看做是一个舰队的话，那么WiGig无疑是其中的一个超级战舰——运行在60GHz频段的WiGig技术，理论峰值可以达到7Gbps。从定义上看，WiGig是工作在60GHz频带上，实现数千兆位元速度传输的无线传输技术，相比目前广泛部署的Wi-Fi技术，其传输距离更短，但是速度却是802.11n技术的10倍多，可以达到6Gbps。这样的速度意味着十几秒之内就可以完成一部普通DVD的内容传输。在频谱资源日益紧缺的今 天，WiGig瞄准了尚未商用的60GHz频段，这意味着不仅可以在短距离内实现高速传输，还可以避免其他设备干扰，提高频率利用率。 与此同时，WiGig标准的另一大优势在于它可以跟目前的Wi-Fi很好地融合。 WiGig技术很大部分是由传统Wi-Fi技术延伸而来的，因此它能够向下兼容802.11n的能力：当用户距离AP（热点）较远，其无线连接将自动选择 传输速度较慢但传输距离更远的频段（如802.11n）；而当用户距离AP较近时，系统将自动切换到60GHz频段，以获得更高的连接速率。此外，在信号 加密方面，WiGig设备将兼容802.11的WPA2加密算法，确保它与现有无线网络的互联互通。<br/><br/>　　半导体巨头高通正是看到了WiGig的无限潜能，首开了移动设备内建三频无线连结平台先例。高通在完成WiGig技术（802.11ad标准）供应商--Wilocity收购后，已积极将802.11b/g/n、802.11ac及802.11ad三大无线连结标准方案整合于移动设备，并推出基于骁龙（Snapdragon）810处理器的参考设计，期挟同步支援上述三标准且运行于2.4、5、60GHz三个频段的优势，满足4K影音串流、点对点（P2P）传输、无线扩充基座（Wireless Docking）等应用需求。<br/>　　蓝牙全新升级，深入日常应用<br/><br/>　　蓝牙技术在手机领域，尤其是智能手机产品中一直扮演着重要的作用。而熟悉蓝牙技术的用户都知道，目前最新的被广泛应用的蓝牙标准已经到了4.0阶段。不过 最近蓝牙技术联盟的已经正式对外公布了最新的蓝牙4.1技术标准，而将到来的新蓝牙技术将支持智能穿戴设备以及其他一些设备，从而可以允许这些设备直接连接到互联网。<br/><br/>　　相比于蓝牙4.0，蓝牙4.1第一个改进的地方被蓝牙技术联盟称为“共存性”，即蓝牙4.1与LTE无线电信号之间如果同时传输数据，那么蓝牙4.1可以自动协调两者的传输信息，理论 上可以减少其它信号对蓝牙4.1的干扰。其次，第二个改进是提升了连接速度并且更加智能化。比如减少了设备之间重新连接的时间，意味着用户如果走出了蓝牙 4.1的信号范围并且断开连接的时间不算很长，当用户再次回到信号范围中之后设备将自动连接，反应时间要比蓝牙4.0更短。最后一个改进之处是提高传输效率，如果用户连接的设备非常多，比如连接了多部可穿戴设备，彼此之间的信息都能即时发送到接接收设备上。<br/><br/>　zigbee_蓝牙_wifi的比较与区别分析<br/><br/>　　蓝牙技术联盟（Bluetooth SIG）的研究员表示，蓝牙4.1有助于启用和增强物联网，为应用开发人员带来了新的机遇。例如，蓝牙智能手表现在可以在用户游泳或外出跑步时收集数据。随后，这些数据会在用户返回家 后自动传输至智能手机。手表还可以作为中枢设备，与多个其它收集不同数据的可穿戴设备进行信息交换。返回家后，这些数据会从所有设备中收集起来并汇总，然后传输和记录至智能手机中，以供用户分析和追踪健康状况变化。对于应用开发人员而言，4.1版意味着在创建支持多个角色的创新产品时具有更高的灵活性，这项更新在可穿戴技术日趋成熟和依赖传感器的情况下尤为有用。<br/><br/>　　相比之下，蓝牙通讯技术拥有大范围的渠道优势如当今的智能手机、PC等都带有蓝牙通讯，蓝牙通讯是一种新兴的短距离、低成本、高传输速率的无线网络技术。在数万个微小的传感器之间相互协调实现通信。而这些传感器只需要很少的功耗，以快速广播的方式通过无线电波将数据从一个传感器传到另一个传感器，通信效率高，目前能全面覆盖每个领域，尤其在军事恶劣环境中起到广泛的应用。<br/><br/>　　近几年中国物联网产业高速发展，智能穿戴、智能家居、智能交通、智慧医疗、智慧农业等行业都有有不俗的表现，促使中国物联网低功耗蓝牙厂商逐渐产生了大量的应用规范和专利技术。其中昇润科技是一家专业研发生产低功耗蓝牙通讯方案，其产品方案涉及多个行业应用，尤其在智能穿戴设备、智能家居设备、智慧医疗方面有显著的研发技术，近期昇润科技www.tuner168.com研发一款可穿戴智能蓝牙手环方案，能支持移动支付功能，多对多连接功能、银联消费刷卡，公交地铁刷卡等，还能同时管理智能家居设备，可实现多人进行管理操作，促使中国物联网低功耗蓝牙的发展上一个新台阶。随着物联网低功耗蓝牙技术逐渐成熟，无线智能家居行业展现出飞速发展势头，很有可能成为未来发展趋势。相对于传统的有线智能家居系统，以蓝牙通讯技术为基础的无线智能家居优势非常明显，可以不需要密密麻麻的布线，安装非常简单，只要能看懂说明书，就可自行组合安装;自动组网连接，设备扩展性能强;功耗低，成本也低，符合绿色生活理念;其售后维修也方便，能准确及时得地检测故障，并及时修复，能适合多种住宅。<br/><br/>　　中国物联网低功耗蓝牙企业近年来发展较快，产品具有优势核心技术，在国外市场也拥有较大的市场份额，已处于领跑地位，放眼整个国际市场也处于前列，竞争优势明显，估计以后将有更多的国内企业走向世界，希望将物联网蓝牙通讯技术高科技产品惠及全人类。
]]>
</description>
</item><item>
<link>https://bb.y48.net/read.php?5</link>
<title><![CDATA[JavaScript的数据类型]]></title> 
<author>james &lt;admin@yourname.com&gt;</author>
<category><![CDATA[JavaScript]]></category>
<pubDate>Sun, 21 Apr 2019 08:22:49 +0000</pubDate> 
<guid>https://bb.y48.net/read.php?5</guid> 
<description>
<![CDATA[ 
	&nbsp;&nbsp;<p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><strong><span style="font-size: 14pt; font-family: &quot;Times New Roman&quot;; color: black">1</span><span style="font-size: 14pt; font-family: 宋体; color: black">．整型数据</span></strong></p>&nbsp;&nbsp;<p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: 14pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black"><span style="font-size: x-small; font-family: helvetica">在</span></span><span style="font-size: x-small; font-family: helvetica"><span style="font-size: 14pt; color: black">JavaScript</span><span style="font-size: 14pt; color: black">程序中，十进制的整数是一个数字序列。例如：</span></span></p><span style="font-size: x-small; font-family: helvetica">&nbsp;&nbsp;</span><p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: x-small; font-family: helvetica"><span style="font-size: 14pt; color: black">0</span></span></p><span style="font-size: x-small; font-family: helvetica">&nbsp;&nbsp;</span><p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: x-small; font-family: helvetica"><span style="font-size: 14pt; color: black">7</span></span></p><span style="font-size: x-small; font-family: helvetica">&nbsp;&nbsp;</span><p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: x-small; font-family: helvetica"><span style="font-size: 14pt; color: black">﹣8</span></span></p><span style="font-size: x-small; font-family: helvetica">&nbsp;&nbsp;</span><p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: x-small; font-family: helvetica"><span style="font-size: 14pt; color: black">1000</span></span></p><span style="font-size: x-small; font-family: helvetica">&nbsp;&nbsp;</span><p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: x-small; font-family: helvetica"><span style="font-size: 14pt; color: black"><span>&nbsp; </span>JavaScript</span><span style="font-size: 14pt; color: black">的数字格式允许精确地表示</span><span style="font-size: 14pt; color: black">﹣900719925474092</span><span style="font-size: 14pt; color: black">（</span><span style="font-size: 14pt; color: black">﹣253</span><span style="font-size: 14pt; color: black">）和</span><span style="font-size: 14pt; color: black">900719925474092</span><span style="font-size: 14pt; color: black">（</span><span style="font-size: 14pt; color: black">253</span><span style="font-size: 14pt; color: black">）之间的所有整数（包括</span><span style="font-size: 14pt; color: black">﹣900719925474092</span><span style="font-size: 14pt; color: black">（</span><span style="font-size: 14pt; color: black">﹣253</span><span style="font-size: 14pt; color: black">）和</span><span style="font-size: 14pt; color: black">900719925474092</span><span style="font-size: 14pt; color: black">（</span><span style="font-size: 14pt; color: black">253</span><span style="font-size: 14pt; color: black">））。但是使用超过这个范围的整数，就会失去尾数的精确性。需要注意的是，</span><span style="font-size: 14pt; color: black">JavaScript</span><span style="font-size: 14pt; color: black">中的某些整数运算是对</span><span style="font-size: 14pt; color: black">32</span><span style="font-size: 14pt; color: black">位的整数执行的，它们的范围从</span><span style="font-size: 14pt; color: black">﹣2147483648</span><span style="font-size: 14pt; color: black">（</span><span style="font-size: 14pt; color: black">﹣231</span><span style="font-size: 14pt; color: black">）到</span><span style="font-size: 14pt; color: black">2147483647</span><span style="font-size: 14pt; color: black">（</span><span style="font-size: 14pt; color: black">231-1</span><span style="font-size: 14pt; color: black">）。</span></span></p>&nbsp;&nbsp;<p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: 14pt; font-weight: bold; font-family: &quot;Times New Roman&quot;; color: black"><span>&nbsp; </span>2</span><span style="font-size: 14pt; font-weight: bold; font-family: 宋体; color: black">．十六进制和八进制</span></p>&nbsp;&nbsp;<p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: 14pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black"><span>&nbsp;<span style="font-size: x-small"> </span></span><span style="font-size: x-small">JavaScript</span></span><span style="font-size: x-small"><span style="font-size: 14pt; font-weight: normal; font-family: 宋体; color: black">不但能够处理十进制的整型数据，还能识别十六进制（以</span><span style="font-size: 14pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">16</span><span style="font-size: 14pt; font-weight: normal; font-family: 宋体; color: black">为基数）的数据。所谓十六进制数据，是以&ldquo;</span><span style="font-size: 14pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">0X</span><span style="font-size: 14pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">&rdquo;</span><span style="font-size: 14pt; font-weight: normal; font-family: 宋体; color: black">和&ldquo;</span><span style="font-size: 14pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">0x</span><span style="font-size: 14pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">&rdquo;</span><span style="font-size: 14pt; font-weight: normal; font-family: 宋体; color: black">开头，其后跟随十六进制数字串的直接量。十六进制的数字可以是</span><span style="font-size: 14pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">0</span><span style="font-size: 14pt; font-weight: normal; font-family: 宋体; color: black">到</span><span style="font-size: 14pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">9</span><span style="font-size: 14pt; font-weight: normal; font-family: 宋体; color: black">中的某个数字，也可以是</span><span style="font-size: 14pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">a</span><span style="font-size: 14pt; font-weight: normal; font-family: 宋体; color: black">（</span><span style="font-size: 14pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">A</span><span style="font-size: 14pt; font-weight: normal; font-family: 宋体; color: black">）到</span><span style="font-size: 14pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">f</span><span style="font-size: 14pt; font-weight: normal; font-family: 宋体; color: black">（</span><span style="font-size: 14pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">F</span><span style="font-size: 14pt; font-weight: normal; font-family: 宋体; color: black">）中的某个字母，它们用来表示</span><span style="font-size: 14pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">0</span><span style="font-size: 14pt; font-weight: normal; font-family: 宋体; color: black">到</span><span style="font-size: 14pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">15</span><span style="font-size: 14pt; font-weight: normal; font-family: 宋体; color: black">之间（包括</span><span style="font-size: 14pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">0</span><span style="font-size: 14pt; font-weight: normal; font-family: 宋体; color: black">和</span><span style="font-size: 14pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">15</span><span style="font-size: 14pt; font-weight: normal; font-family: 宋体; color: black">）的某个值，下面是十六进制整型数据的例子：</span></span></p><span style="font-size: x-small">&nbsp;&nbsp;</span><p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: x-small"><span style="font-size: 14pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">0xff</span><span style="font-size: 14pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black"><span>&nbsp; </span>//15*16+15=225</span><span style="font-size: 14pt; font-weight: normal; font-family: 宋体; color: black">（基数为</span><span style="font-size: 14pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">10</span><span style="font-size: 14pt; font-weight: normal; font-family: 宋体; color: black">）</span></span></p><span style="font-size: x-small">&nbsp;&nbsp;</span><p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: x-small"><span style="font-size: 14pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">0xCAFE911</span></span></p><span style="font-size: x-small">&nbsp;&nbsp;</span><p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: x-small"><span style="font-size: 14pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black"><span>&nbsp; </span>尽管</span><span style="font-size: 14pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">ECMAScripr</span><span style="font-size: 14pt; font-weight: normal; font-family: 宋体; color: black">标准不支持八进制数据，但是</span><span style="font-size: 14pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">JavaScript</span><span style="font-size: 14pt; font-weight: normal; font-family: 宋体; color: black">的某些实现却允许采用八进制（基数为</span><span style="font-size: 14pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">8</span><span style="font-size: 14pt; font-weight: normal; font-family: 宋体; color: black">）格式的整型数据。八进制数据以数字</span><span style="font-size: 14pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">0</span><span style="font-size: 14pt; font-weight: normal; font-family: 宋体; color: black">开头，其后跟随一个数字序列，这个序列中的每个数字都在</span><span style="font-size: 14pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">0</span><span style="font-size: 14pt; font-weight: normal; font-family: 宋体; color: black">和</span><span style="font-size: 14pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">7</span><span style="font-size: 14pt; font-weight: normal; font-family: 宋体; color: black">之间（包括</span><span style="font-size: 14pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">0</span><span style="font-size: 14pt; font-weight: normal; font-family: 宋体; color: black">和</span><span style="font-size: 14pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">7</span><span style="font-size: 14pt; font-weight: normal; font-family: 宋体; color: black">），例如：</span></span></p><span style="font-size: x-small">&nbsp;&nbsp;</span><p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: x-small"><span style="font-size: 14pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">0377<span>&nbsp; </span>//3*64+7*8+7=255</span><span style="font-size: 14pt; font-weight: normal; font-family: 宋体; color: black">（基数为</span><span style="font-size: 14pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">10</span><span style="font-size: 14pt; font-weight: normal; font-family: 宋体; color: black">）</span></span></p><span style="font-size: x-small">&nbsp;&nbsp;</span><p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: x-small"><span style="font-size: 14pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black"><span>&nbsp; </span>由于某些</span><span style="font-size: 14pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">JavaScript</span><span style="font-size: 14pt; font-weight: normal; font-family: 宋体; color: black">实现支持八进制数据，而有些则不支持，所以最好不要使用以</span><span style="font-size: 14pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">0</span><span style="font-size: 14pt; font-weight: normal; font-family: 宋体; color: black">开头的整型数据，因为不知道某个</span><span style="font-size: 14pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">JavaScript</span><span style="font-size: 14pt; font-weight: normal; font-family: 宋体; color: black">的实现是将其解释为十进制，还是解释为八进制。</span></span></p><p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><br /><span style="font-size: 14pt; font-weight: normal; font-family: 宋体; color: black">&nbsp;&nbsp;</span></p><p style="margin-top: 0pt; margin-bottom: 0pt; text-align: left; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: 18pt; font-weight: bold; font-family: &quot;Times New Roman&quot;; color: black">3</span><span style="font-size: 18pt; font-weight: bold; font-family: 宋体; color: black">．浮点型数据</span></p>&nbsp;&nbsp;<p style="margin-top: 0pt; margin-bottom: 0pt; text-align: left; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black"><span style="font-size: x-small">浮点型数据可以具有小数点，它们采用的是传统科学记数法的语法。一个实数值可以被表示为整数部分后加小数点和小数部分。</span></span></p><span style="font-size: x-small">&nbsp;&nbsp;</span><p style="margin-top: 0pt; margin-bottom: 0pt; text-align: left; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: x-small"><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black"><span>&nbsp; </span>此外，还可以使用指数法表示浮点型数据，即实数后跟随字母</span><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">e</span><span style="font-size: 18pt; font-weight: normal; font-family: 宋体; color: black">或</span><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">E</span><span style="font-size: 18pt; font-weight: normal; font-family: 宋体; color: black">，后面加上正负号，其后再加一个整型指数。这种记数法表示的数值等于前面的实数乘以</span><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">10</span><span style="font-size: 18pt; font-weight: normal; font-family: 宋体; color: black">的指数次幂。</span></span></p><span style="font-size: x-small">&nbsp;&nbsp;</span><p style="margin-top: 0pt; margin-bottom: 0pt; text-align: left; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: x-small"><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black"><span>&nbsp; </span>语法：</span></span></p><span style="font-size: x-small">&nbsp;&nbsp;</span><p style="margin-top: 0pt; margin-bottom: 0pt; text-align: left; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: x-small"><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black"><span>&nbsp;</span></span><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">[digits] [.digits] [(</span><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">E&#124;e</span><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">[(+&#124;-)])]</span></span></p><span style="font-size: x-small">&nbsp;&nbsp;</span><p style="margin-top: 0pt; margin-bottom: 0pt; text-align: left; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: x-small"><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black"><span>&nbsp; </span>例如：</span></span></p><span style="font-size: x-small">&nbsp;&nbsp;</span><p style="margin-top: 0pt; margin-bottom: 0pt; text-align: left; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: x-small"><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">1.2</span></span></p><span style="font-size: x-small">&nbsp;&nbsp;</span><p style="margin-top: 0pt; margin-bottom: 0pt; text-align: left; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: x-small"><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">.33333333</span></span></p><span style="font-size: x-small">&nbsp;&nbsp;</span><p style="margin-top: 0pt; margin-bottom: 0pt; text-align: left; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: x-small"><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">3.12e11</span><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black"><span>&nbsp; </span>//3.12&times;1011</span></span></p><span style="font-size: x-small">&nbsp;&nbsp;<span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">1.234E﹣12</span><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black"><span>&nbsp; </span>//1.234&times;10﹣12</span></span><p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><strong><span style="font-size: 14pt; font-family: 宋体; color: black"><br /></span></strong></p><p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: medium"><strong><span style="font-size: 14pt; font-family: 宋体; color: black">4.字符串</span></strong></span></p><p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><br /><span style="font-size: 14pt; font-weight: normal; font-family: 宋体; color: black">&nbsp;&nbsp;</span></p><p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: x-small"><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black"><span>&nbsp; </span>字符串（</span><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">string</span><span style="font-size: 18pt; font-weight: normal; font-family: 宋体; color: black">）是由</span><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">Unicode</span><span style="font-size: 18pt; font-weight: normal; font-family: 宋体; color: black">字符、数字、标点符号等组成的序列，它是</span><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">JavaScript</span><span style="font-size: 18pt; font-weight: normal; font-family: 宋体; color: black">用来表示文本的数据类型。程序中的字符串型数据是包含在单引号或双引号中的，由单引号定界的字符串中可以含有双引号，由双引号定界的字符串中也可以含有单引号。</span></span></p><span style="font-size: x-small">&nbsp;&nbsp;</span><p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: x-small"><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black"><span>&nbsp; </span>例如：</span></span></p><span style="font-size: x-small">&nbsp;&nbsp;</span><p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: x-small"><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black"><span>&nbsp; </span>（</span><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">1</span><span style="font-size: 18pt; font-weight: normal; font-family: 宋体; color: black">）单引号括起来的一个或多个字符，代码如下：</span></span></p><span style="font-size: x-small">&nbsp;&nbsp;</span><p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: x-small"><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">'</span><span style="font-size: 18pt; font-weight: normal; font-family: 宋体; color: black">啊</span><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">'</span></span></p><span style="font-size: x-small">&nbsp;&nbsp;</span><p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: x-small"><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">'</span><span style="font-size: 18pt; font-weight: normal; font-family: 宋体; color: black">活着的人却拥有着一颗沉睡的心</span><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">'</span></span></p><span style="font-size: x-small">&nbsp;&nbsp;</span><p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: x-small"><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black"><span>&nbsp; </span>（</span><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">2</span><span style="font-size: 18pt; font-weight: normal; font-family: 宋体; color: black">）双引号括起来的一个或多个字符，代码如下：</span></span></p><span style="font-size: x-small">&nbsp;&nbsp;</span><p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: x-small"><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">&quot;</span><span style="font-size: 18pt; font-weight: normal; font-family: 宋体; color: black">呀</span><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">&quot;</span></span></p><span style="font-size: x-small">&nbsp;&nbsp;</span><p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: x-small"><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">&quot;</span><span style="font-size: 18pt; font-weight: normal; font-family: 宋体; color: black">我想学习</span><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">JavaScript&quot;</span></span></p><span style="font-size: x-small">&nbsp;&nbsp;</span><p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: x-small"><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black"><span>&nbsp; </span>（</span><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">3</span><span style="font-size: 18pt; font-weight: normal; font-family: 宋体; color: black">）单引号定界的字符串中可以含有双引号，代码如下：</span></span></p><span style="font-size: x-small">&nbsp;&nbsp;</span><p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: x-small"><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">'name=&quot;</span><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">myname</span><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">&quot;'</span></span></p><span style="font-size: x-small">&nbsp;&nbsp;</span><p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: x-small"><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black"><span>&nbsp; </span>（</span><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">4</span><span style="font-size: 18pt; font-weight: normal; font-family: 宋体; color: black">）双引号定界的字符串中可以含有单引号，代码如下：</span></span></p><span style="font-size: x-small">&nbsp;&nbsp;</span><p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: x-small"><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">&quot;You can call me 'Tom'!&quot;</span></span></p>&nbsp;&nbsp;<p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: 14pt; font-weight: normal; font-family: 宋体; color: black"><span style="font-size: medium"><strong>5.布尔类型</strong></span><br /></span></p><p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><br /><span style="font-size: 14pt; font-weight: normal; font-family: 宋体; color: black">&nbsp;&nbsp;</span></p><p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: x-small"><span style="font-size: 16pt; font-weight: normal; font-family: 宋体; color: black">数值数据类型和字符串数据类型的值都无穷多，但是布尔数据类型只有两个值，这两个合法的值分别由直接量&ldquo;</span><span style="font-size: 16pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">true&rdquo;</span><span style="font-size: 16pt; font-weight: normal; font-family: 宋体; color: black">和&ldquo;</span><span style="font-size: 16pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">false&rdquo;</span><span style="font-size: 16pt; font-weight: normal; font-family: 宋体; color: black">表示，它说明了某个事物是真还是假。</span></span></p><span style="font-size: x-small">&nbsp;&nbsp;</span><p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: x-small"><span style="font-size: 16pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black"><span>&nbsp; </span>布尔值通常在</span><span style="font-size: 16pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">JavaScript</span><span style="font-size: 16pt; font-weight: normal; font-family: 宋体; color: black">程序中用来比较所得的结果。例如：</span></span></p><span style="font-size: x-small">&nbsp;&nbsp;</span><p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: x-small"><span style="font-size: 16pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">n==1</span></span></p><span style="font-size: x-small">&nbsp;&nbsp;</span><p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: x-small"><span style="font-size: 16pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black"><span>&nbsp; </span>这行代码测试了变量</span><span style="font-size: 16pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">n</span><span style="font-size: 16pt; font-weight: normal; font-family: 宋体; color: black">的值是否和数值</span><span style="font-size: 16pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">1</span><span style="font-size: 16pt; font-weight: normal; font-family: 宋体; color: black">相等。如果相等，比较的结果就是布尔值</span><span style="font-size: 16pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">true</span><span style="font-size: 16pt; font-weight: normal; font-family: 宋体; color: black">，否则结果就是</span><span style="font-size: 16pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">false</span><span style="font-size: 16pt; font-weight: normal; font-family: 宋体; color: black">。</span></span></p><span style="font-size: x-small">&nbsp;&nbsp;</span><p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: x-small"><span style="font-size: 16pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black"><span>&nbsp; </span>布尔值通常用于</span><span style="font-size: 16pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">JavaScript</span><span style="font-size: 16pt; font-weight: normal; font-family: 宋体; color: black">的控制结构。例如，</span><span style="font-size: 16pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">JavaScript</span><span style="font-size: 16pt; font-weight: normal; font-family: 宋体; color: black">的</span><span style="font-size: 16pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">if/else</span><span style="font-size: 16pt; font-weight: normal; font-family: 宋体; color: black">语句就是在布尔值为</span><span style="font-size: 16pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">true</span><span style="font-size: 16pt; font-weight: normal; font-family: 宋体; color: black">时执行一个动作，而在布尔值为</span><span style="font-size: 16pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">false</span><span style="font-size: 16pt; font-weight: normal; font-family: 宋体; color: black">时执行另一个动作。通常将一个创建布尔值与使用这个比较的语句结合在一起。例如：</span></span></p><span style="font-size: x-small">&nbsp;&nbsp;</span><p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: x-small"><span style="font-size: 16pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">if (n==1)</span></span></p><span style="font-size: x-small">&nbsp;&nbsp;</span><p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: x-small"><span style="font-size: 16pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black"><span>&nbsp; </span>m=</span><span style="font-size: 16pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">n+1</span><span style="font-size: 16pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">;</span></span></p><span style="font-size: x-small">&nbsp;&nbsp;</span><p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: x-small"><span style="font-size: 16pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">else</span></span></p><span style="font-size: x-small">&nbsp;&nbsp;</span><p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: x-small"><span style="font-size: 16pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">n=</span><span style="font-size: 16pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">n+1</span><span style="font-size: 16pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">;</span></span></p><span style="font-size: x-small">&nbsp;&nbsp;</span><p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: x-small"><span style="font-size: 16pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black"><span>&nbsp; </span>本段代码检测了</span><span style="font-size: 16pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">n</span><span style="font-size: 16pt; font-weight: normal; font-family: 宋体; color: black">是否等于</span><span style="font-size: 16pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">1</span><span style="font-size: 16pt; font-weight: normal; font-family: 宋体; color: black">。如果相等，就给</span><span style="font-size: 16pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">m</span><span style="font-size: 16pt; font-weight: normal; font-family: 宋体; color: black">增加</span><span style="font-size: 16pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">1</span><span style="font-size: 16pt; font-weight: normal; font-family: 宋体; color: black">，否则给</span><span style="font-size: 16pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">n</span><span style="font-size: 16pt; font-weight: normal; font-family: 宋体; color: black">加</span><span style="font-size: 16pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">1</span><span style="font-size: 16pt; font-weight: normal; font-family: 宋体; color: black">。</span></span></p><span style="font-size: x-small">&nbsp;&nbsp;</span><p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: x-small"><span style="font-size: 16pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black"><span>&nbsp; </span>有时候可以把两个可能的布尔值看作是&ldquo;</span><span style="font-size: 16pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">on</span><span style="font-size: 16pt; font-weight: normal; font-family: 宋体; color: black">（</span><span style="font-size: 16pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">true</span><span style="font-size: 16pt; font-weight: normal; font-family: 宋体; color: black">）&rdquo;和&ldquo;</span><span style="font-size: 16pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">off</span><span style="font-size: 16pt; font-weight: normal; font-family: 宋体; color: black">（</span><span style="font-size: 16pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">false</span><span style="font-size: 16pt; font-weight: normal; font-family: 宋体; color: black">）&rdquo;，或者看作是&ldquo;</span><span style="font-size: 16pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">yes</span><span style="font-size: 16pt; font-weight: normal; font-family: 宋体; color: black">（</span><span style="font-size: 16pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">true</span><span style="font-size: 16pt; font-weight: normal; font-family: 宋体; color: black">）&rdquo;和&ldquo;</span><span style="font-size: 16pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">no</span><span style="font-size: 16pt; font-weight: normal; font-family: 宋体; color: black">（</span><span style="font-size: 16pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">false</span><span style="font-size: 16pt; font-weight: normal; font-family: 宋体; color: black">）&rdquo;，这样比将它们看作是&ldquo;</span><span style="font-size: 16pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">true&rdquo;</span><span style="font-size: 16pt; font-weight: normal; font-family: 宋体; color: black">和&ldquo;</span><span style="font-size: 16pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">false&rdquo;</span><span style="font-size: 16pt; font-weight: normal; font-family: 宋体; color: black">更为直观。有时候把它们看作是</span><span style="font-size: 16pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">1</span><span style="font-size: 16pt; font-weight: normal; font-family: 宋体; color: black">（</span><span style="font-size: 16pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">true</span><span style="font-size: 16pt; font-weight: normal; font-family: 宋体; color: black">）和</span><span style="font-size: 16pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">0</span><span style="font-size: 16pt; font-weight: normal; font-family: 宋体; color: black">（</span><span style="font-size: 16pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">false</span><span style="font-size: 16pt; font-weight: normal; font-family: 宋体; color: black">）会更加有用（实际上</span><span style="font-size: 16pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">JavaScript</span><span style="font-size: 16pt; font-weight: normal; font-family: 宋体; color: black">确实是这样做的，在必要时会将</span><span style="font-size: 16pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">true</span><span style="font-size: 16pt; font-weight: normal; font-family: 宋体; color: black">转换成</span><span style="font-size: 16pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">1</span><span style="font-size: 16pt; font-weight: normal; font-family: 宋体; color: black">，将</span><span style="font-size: 16pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">false</span><span style="font-size: 16pt; font-weight: normal; font-family: 宋体; color: black">转换成</span><span style="font-size: 16pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">0</span><span style="font-size: 16pt; font-weight: normal; font-family: 宋体; color: black">）。</span></span></p>&nbsp;&nbsp;<p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: 14pt; font-weight: normal; font-family: 宋体; color: black"><br /></span></p><p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: 14pt; font-weight: normal; font-family: 宋体; color: black"><span style="font-size: x-small"><strong>6.特殊数据类型</strong></span><br /></span></p><p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><br /><span style="font-size: 14pt; font-weight: normal; font-family: 宋体; color: black">&nbsp;&nbsp;</span></p><p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: 14pt; font-weight: bold; font-family: &quot;Times New Roman&quot;; color: black">1</span><span style="font-size: 14pt; font-weight: bold; font-family: 宋体; color: black">．转义字符</span></p>&nbsp;&nbsp;<p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: 14pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black"><span>&nbsp; </span>以反斜杠开头的不可显示的特殊字符通常称为控制字符，也被称为转义字符。通过转义字符可以在字符串中添加不可显示的特殊字符，或者防止引号匹配混乱的问题。</span><span style="font-size: 14pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">JavaScript</span><span style="font-size: 14pt; font-weight: normal; font-family: 宋体; color: black">常用的转义字符如表所示。</span><span style="font-size: 14pt; font-weight: bold; font-family: &quot;Lucida Sans Unicode&quot;; color: #669900"> </span></p>&nbsp;&nbsp;<p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><br /><span style="font-size: 14pt; font-weight: normal; font-family: 宋体; color: black">&nbsp;&nbsp;</span></p><p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: 14pt; font-weight: normal; font-family: 宋体; color: black">在</span><span style="font-size: 14pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">document.writeln</span><span style="font-size: 14pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">();</span><span style="font-size: 14pt; font-weight: normal; font-family: 宋体; color: black">语句中使用转义字符时，只有将其放在格式化文本块中才会起作用，所以脚本必须在</span><span style="font-size: 14pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">&lt;pre&gt;</span><span style="font-size: 14pt; font-weight: normal; font-family: 宋体; color: black">和</span><span style="font-size: 14pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">&lt;/pre&gt;</span><span style="font-size: 14pt; font-weight: normal; font-family: 宋体; color: black">的标签内。</span></p>&nbsp;&nbsp;<p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: 14pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black"><span>&nbsp; </span>例如，下面是应用转义字符使字符串换行，程序代码如下：</span></p>&nbsp;&nbsp;<p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: 14pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">document.writeln</span><span style="font-size: 14pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">(&quot;&lt;pre&gt;&quot;);</span></p>&nbsp;&nbsp;<p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: 14pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">document.writeln</span><span style="font-size: 14pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">(&quot;</span><span style="font-size: 14pt; font-weight: normal; font-family: 宋体; color: black">轻松学习</span><span style="font-size: 14pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">&#92;</span><span style="font-size: 14pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">nJavaScript</span><span style="font-size: 14pt; font-weight: normal; font-family: 宋体; color: black">语言！</span><span style="font-size: 14pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">&quot;);</span></p>&nbsp;&nbsp;<p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: 14pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">document.writeln</span><span style="font-size: 14pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">(&quot;&lt;/pre&gt;&quot;);</span></p>&nbsp;&nbsp;<p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: 14pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black"><span>&nbsp; </span>运行结果：</span></p>&nbsp;&nbsp;<p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: 14pt; font-weight: normal; font-family: 宋体; color: black">轻松学习</span></p>&nbsp;&nbsp;<p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: 14pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">JavaScript</span><span style="font-size: 14pt; font-weight: normal; font-family: 宋体; color: black">语言！</span></p>&nbsp;&nbsp;<p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: 14pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black"><span>&nbsp; </span>如果上述代码不使用</span><span style="font-size: 14pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">&lt;pre&gt;</span><span style="font-size: 14pt; font-weight: normal; font-family: 宋体; color: black">和</span><span style="font-size: 14pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">&lt;/pre&gt;</span><span style="font-size: 14pt; font-weight: normal; font-family: 宋体; color: black">的标签，则转义字符不起作用，代码如下：</span></p>&nbsp;&nbsp;<p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: 14pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">document.writeln</span><span style="font-size: 14pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">(&quot;</span><span style="font-size: 14pt; font-weight: normal; font-family: 宋体; color: black">快快乐乐</span><span style="font-size: 14pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">&#92;n</span><span style="font-size: 14pt; font-weight: normal; font-family: 宋体; color: black">平平安安！</span><span style="font-size: 14pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">&quot;);</span></p>&nbsp;&nbsp;<p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: 14pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black"><span>&nbsp; </span>运行结果：</span></p>&nbsp;&nbsp;<span style="font-size: 14pt; font-weight: normal; font-family: 宋体; color: black">快快乐乐平平安安！</span><p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><br /><span style="font-size: 14pt; font-weight: normal; font-family: 宋体; color: black">&nbsp;&nbsp;</span></p><p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: 18pt; font-weight: bold; font-family: &quot;Times New Roman&quot;; color: black">2</span><span style="font-size: 18pt; font-weight: bold; font-family: 宋体; color: black">．未定义值</span></p>&nbsp;&nbsp;<p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black"><span>&nbsp; </span>未定义类型的变量是</span><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">undefined</span><span style="font-size: 18pt; font-weight: normal; font-family: 宋体; color: black">，表示变量还没有赋值（如</span><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">var a;</span><span style="font-size: 18pt; font-weight: normal; font-family: 宋体; color: black">），或者赋予一个不存在的属性值（如</span><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">var a=</span><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">String.notProperty</span><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">;</span><span style="font-size: 18pt; font-weight: normal; font-family: 宋体; color: black">）。</span></p>&nbsp;&nbsp;<p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black"><span>&nbsp; </span>此外，</span><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">JavaScript</span><span style="font-size: 18pt; font-weight: normal; font-family: 宋体; color: black">中有一种特殊类型的数字常量</span><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">NaN</span><span style="font-size: 18pt; font-weight: normal; font-family: 宋体; color: black">，即&ldquo;非数字&rdquo;。当在程序中由于某种原因发生计算错误后，将产生一个没有意义的数字，此时</span><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">JavaScript</span><span style="font-size: 18pt; font-weight: normal; font-family: 宋体; color: black">返回的数字值就是</span><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">NaN</span><span style="font-size: 18pt; font-weight: normal; font-family: 宋体; color: black">。</span></p>&nbsp;&nbsp;<p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black"><span>&nbsp; </span></span><span style="font-size: 18pt; font-weight: bold; font-family: &quot;Times New Roman&quot;; color: black">3</span><span style="font-size: 18pt; font-weight: bold; font-family: 宋体; color: black">．空值（</span><span style="font-size: 18pt; font-weight: bold; font-family: &quot;Times New Roman&quot;; color: black">null</span><span style="font-size: 18pt; font-weight: bold; font-family: 宋体; color: black">）</span></p>&nbsp;&nbsp;<p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black"><span>&nbsp; </span>JavaScript</span><span style="font-size: 18pt; font-weight: normal; font-family: 宋体; color: black">中的关键字</span><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">null</span><span style="font-size: 18pt; font-weight: normal; font-family: 宋体; color: black">是一个特殊的值，它表示为空值，用于定义空的或不存在的引用。如果试图引用一个没有定义的变量，则返回一个</span><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">null</span><span style="font-size: 18pt; font-weight: normal; font-family: 宋体; color: black">值。这里必须要注意的是：</span><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">null</span><span style="font-size: 18pt; font-weight: normal; font-family: 宋体; color: black">不等同于空的字符串（</span><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">&quot;&quot;</span><span style="font-size: 18pt; font-weight: normal; font-family: 宋体; color: black">）或</span><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">0</span><span style="font-size: 18pt; font-weight: normal; font-family: 宋体; color: black">。</span></p>&nbsp;&nbsp;<p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black"><span>&nbsp; </span>由此可见，</span><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">null</span><span style="font-size: 18pt; font-weight: normal; font-family: 宋体; color: black">与</span><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">undefined</span><span style="font-size: 18pt; font-weight: normal; font-family: 宋体; color: black">的区别是，</span><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">null</span><span style="font-size: 18pt; font-weight: normal; font-family: 宋体; color: black">表示一个变量被赋予了一个空值，而</span><span style="font-size: 18pt; font-weight: normal; font-family: &quot;Times New Roman&quot;; color: black">undefined</span><span style="font-size: 18pt; font-weight: normal; font-family: 宋体; color: black">则表示该变量尚未被赋值。</span></p>&nbsp;&nbsp;<p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: 14pt; font-weight: normal; font-family: 宋体; color: black"><br /></span></p><p style="margin-top: 0pt; margin-bottom: 0pt; text-align: justify; direction: ltr; unicode-bidi: embed; vertical-align: baseline"><span style="font-size: 14pt; font-weight: normal; font-family: 宋体; color: black"><br /></span></p>&nbsp;&nbsp;<br/>Tags - <a href="https://bb.y48.net/tag.php?tag=javascript" rel="tag">javascript</a> , <a href="https://bb.y48.net/tag.php?tag=%25E6%2595%25B0%25E6%258D%25AE%25E7%25B1%25BB%25E5%259E%258B" rel="tag">数据类型</a>
]]>
</description>
</item>
</channel>
</rss>