• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
随意浏览
博客园 首页 新随笔 联系 订阅 订阅 管理

2021年12月24日

函数内的变量提升
摘要: ​ 先看一题 var name = 'Tom'; function () { if(typeof name == 'undefined'){ var name = 'jack' console.log('GoodBye' + name) }else{ console.log('Hello'+name 阅读全文
posted @ 2021-12-24 11:06 随意浏览 阅读(51) 评论(0) 推荐(0)
 
 

2021年11月4日

word-wrap, word-break, white-space的区别(即换行问题)
摘要: 上一个实例,浏览器对常规的文本,在容器显示不全的情况下,会自动换行显示下一个单词,但是对超长的单词,会溢出 <div class="test1">aaa bbb ccc dddddddd</div> word-wrap 是否运行文本单词内换行 在上面的示例上,加上word-wrap .test1{ 阅读全文
posted @ 2021-11-04 15:09 随意浏览 阅读(150) 评论(0) 推荐(0)
 
 

2021年11月3日

事件的捕获与冒泡
摘要: 冒泡与捕获 先上代码 <div id="a"> a <div id="b"> b <div id="c"> c </div> </div> </div> document.getElementById('a').addEventListener('click', function(){ consol 阅读全文
posted @ 2021-11-03 14:22 随意浏览 阅读(73) 评论(0) 推荐(0)
 
 

2021年11月2日

vue中ref与getElementByID的区别
摘要: 1 用在常规元素中 <div id="test" ref="test">test</div> console.log(document.getElementById('test')) console.log(this.$refs.test) ref与getElement获取到的内容相同 在网上查到有 阅读全文
posted @ 2021-11-02 16:02 随意浏览 阅读(1142) 评论(0) 推荐(0)
 
 

2020年4月29日

获取系统语言(缩写形式)的方法
摘要: function GetSystemDefaultUILanguage : LANGID; stdcall; external kernel32 name 'GetSystemDefaultUILanguage'; function GetUserCountry : string; var l : 阅读全文
posted @ 2020-04-29 16:48 随意浏览 阅读(272) 评论(0) 推荐(0)
 
获取GUID的方法
摘要: function GetGUID:string; var id:tguid; begin if CoCreateGuid(id)=s_ok then result:=guidtostring(id); end; 阅读全文
posted @ 2020-04-29 13:21 随意浏览 阅读(586) 评论(0) 推荐(0)
 
 

公告


博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3