摘要: 生命周期: 1.又名:生命周期回调函数、生命周期函数、生命周期钩子。 2.是什么:Vue在关键时刻帮我们调用的些特殊名称的函数。 3.生命周期函数的名字不可更改,但函数的具体内容是程序员根据需求编写的。 4.生命周期函数中的this指向是vm或组件实例对象。 示例: <div id="root"> 阅读全文
posted @ 2021-12-13 14:02 AlsosHleeu 阅读(23) 评论(0) 推荐(0)
摘要: 题目描述: 请实现一个函数,将一个字符串中的每个空格替换成“%20”。例如,当字符串为We Are Happy.则经过替换之后的字符串为We%20Are%20Happy。 题解: 使用正则匹配一行代码解决 \s+ 阅读全文
posted @ 2021-11-25 12:39 AlsosHleeu 阅读(20) 评论(0) 推荐(0)
摘要: 题目: var x = 1; function test(x, y = function(){ x =3; console.log(x); }){ console.log(x); let x = 2; y(); console.log(x); } test(); console.log(x); 题解 阅读全文
posted @ 2021-11-23 11:50 AlsosHleeu 阅读(47) 评论(0) 推荐(0)
摘要: 第一种 function changeName(str) { let arr = [...str]; arr.forEach((item, index) => { if (item "_") { arr.splice(index, 1); arr[index] = arr[index].toUppe 阅读全文
posted @ 2021-11-06 15:01 AlsosHleeu 阅读(305) 评论(0) 推荐(0)
摘要: jsp写form表单时可能会出现中文乱码问题 <form action="${pageContext.request.contextPath}/login" method="get"> 用户名:<input type="text" name="username"> 密码:<input type="p 阅读全文
posted @ 2021-11-05 23:47 AlsosHleeu 阅读(23) 评论(0) 推荐(0)
摘要: 3.1Servlet简介 Servlet就是sun公司开发动态web的一门技术 Sun在这些APi中提供一个接口叫做:Servlet,如果你想开发一个Servlet程序,只需要完成两个小步骤: 编写一个类,实现Serlet接口 把开发好java类部署到web服务器中。 **把实现了Servlet接口 阅读全文
posted @ 2021-11-05 21:04 AlsosHleeu 阅读(21) 评论(0) 推荐(0)
摘要: 1.基本概念 *概念:其实就是一个容器 (集合),存放数据库连接的容器。 当系统初始化好后,容器被创建,容器中会申请一些连接对象, 当用户来访问数据库时,从容器中获取连接对象,用户访问完之后,会将连接对象归还给容器。 *好处: 1.节约资源 2.用户访问高效 1.标准接口: Datasource j 阅读全文
posted @ 2021-11-05 20:53 AlsosHleeu 阅读(9) 评论(0) 推荐(0)