﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>WEB应用开发 &#8211; 学术创新中心</title>
	<atom:link href="https://www.leexinghai.com/aic/category/gcc/2stls/wad/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.leexinghai.com/aic</link>
	<description>Academic Innovation Center</description>
	<lastBuildDate>Tue, 13 Jun 2023 11:55:44 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://www.leexinghai.com/aic/wp-content/uploads/2025/08/cropped-徽标名称-32x32.jpg</url>
	<title>WEB应用开发 &#8211; 学术创新中心</title>
	<link>https://www.leexinghai.com/aic</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>H30625-实验6-MVC模型实现用户注册功能</title>
		<link>https://www.leexinghai.com/aic/h30625-%e5%ae%9e%e9%aa%8c6-mvc%e6%a8%a1%e5%9e%8b%e5%ae%9e%e7%8e%b0%e7%94%a8%e6%88%b7%e6%b3%a8%e5%86%8c%e5%8a%9f%e8%83%bd/</link>
		
		<dc:creator><![CDATA[李星海]]></dc:creator>
		<pubDate>Tue, 13 Jun 2023 11:55:44 +0000</pubDate>
				<category><![CDATA[WEB应用开发]]></category>
		<guid isPermaLink="false">https://aic.leexinghai.com/?p=2865</guid>

					<description><![CDATA[实验目的 二、实验环境  IDEA2019、Windows10、Servlet、JSP、JavaBean。  [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p><strong>实验目的</strong><strong></strong></p>



<ul class="wp-block-list">
<li>了解JSP开发模型发展历程。</li>



<li>熟悉JSP Model1和JSP Model2模型的原理。</li>



<li>掌握MVC（Model-View-Controller，模型-视图-控制器）设计模式，其中控制器的角色由Servlet实现，视图的角色由JSP页面实现，模型的角色是由JavaBean实现。</li>
</ul>



<p><strong>二、实验环境</strong><strong></strong></p>



<p> IDEA2019、Windows10、Servlet、JSP、JavaBean。</p>



<p><strong>三、</strong>实验步骤</p>



<p>实现用户注册需要创建两个JSP页面，注册页面register.jsp和注册成功提示信息页面loginSuccess.jsp；一个负责处理用户注册的请求的Servlet类ControllerServlet；两个JavaBean类，封装注册表单信息的JavaBean类RegisterFormBean和封装用户信息的JavaBean类UserBean；一个访问模拟数据库的辅助类DBUtil，这些组件的关系如下图所示。</p>





<p>（1）UserBean是封装用户信息的JavaBean，ControllerServlet根据用户注册信息创建出一个UserBean对象，并将UserBean对象添加到DBUtil对象中users成员，loginSuccess.jsp页面从UserBean对象中提取用户信息进行显示。</p>



<p>（2）RegisterFormBean是封装注册表单信息的JavaBean，用于校验从ControllerServlet中获取到的注册表单信息中的各个属性（也就是注册表单内的各个字段中所填写的数据）。</p>



<p>（3）DBUtil是用于访问数据库的辅助类，它相当于一个DAO（数据访问对象）。DBUtil类中封装了一个HashMap对象，用于模拟数据库中用户注册的信息，HashMap对象中的每一个元素即为一个UserBean对象。</p>



<p>（4）ControllerServlet是控制器，它负责处理用户注册的请求，如果注册成功，就会跳到loginSuccess.jsp页面，如果注册失败，重新跳回到register.jsp页面并显示错误信息。</p>



<p>（5）register.jsp是显示用户注册表单的页面，它将注册请求提交给ControllerServlet处理。</p>



<p>（6）loginSuccess.jsp是用户登录成功后进入的页面，新注册成功的用户自动完成登录，直接进入loginSuccess.jsp页面。</p>



<p><strong>四、实验过程</strong></p>



<p>1.本实验的文件结构如图1所示。</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img fetchpriority="high" decoding="async" width="534" height="719" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-119.png" alt="" class="wp-image-2884" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-119.png 534w, https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-119-223x300.png 223w" sizes="(max-width: 534px) 100vw, 534px" /><figcaption class="wp-element-caption">图1</figcaption></figure>
</div>


<p>2.设置web.xml可以方便指定首页以进行注册页面的指定，指定Web页面首页为register.jsp文件，代码如图2所示。</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img decoding="async" width="989" height="352" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-118.png" alt="" class="wp-image-2883" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-118.png 989w, https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-118-300x107.png 300w, https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-118-768x273.png 768w" sizes="(max-width: 989px) 100vw, 989px" /><figcaption class="wp-element-caption">图2</figcaption></figure>
</div>


<p>3.对于ControllerServlet，代码如图3-图4所示。</p>


<div class="wp-block-image">
<figure class="aligncenter size-full is-resized"><img decoding="async" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-117.png" alt="" class="wp-image-2882" width="842" height="785" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-117.png 989w, https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-117-300x280.png 300w, https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-117-768x717.png 768w" sizes="(max-width: 842px) 100vw, 842px" /><figcaption class="wp-element-caption">图3</figcaption></figure>
</div>

<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="989" height="903" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-116.png" alt="" class="wp-image-2881" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-116.png 989w, https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-116-300x274.png 300w, https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-116-768x701.png 768w" sizes="auto, (max-width: 989px) 100vw, 989px" /><figcaption class="wp-element-caption">图4</figcaption></figure>
</div>


<p>4.对于DBUtil类文件，代码如图5-图6所示。</p>


<div class="wp-block-image">
<figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="797" height="1024" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-115-797x1024.png" alt="" class="wp-image-2880" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-115-797x1024.png 797w, https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-115-233x300.png 233w, https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-115-768x987.png 768w, https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-115.png 947w" sizes="auto, (max-width: 797px) 100vw, 797px" /><figcaption class="wp-element-caption">图5</figcaption></figure>
</div>

<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="669" height="392" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-114.png" alt="" class="wp-image-2879" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-114.png 669w, https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-114-300x176.png 300w" sizes="auto, (max-width: 669px) 100vw, 669px" /><figcaption class="wp-element-caption">图6</figcaption></figure>
</div>


<p>5.对于RegisterFormBean文件，代码如图7-图9所示。</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="989" height="832" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-113.png" alt="" class="wp-image-2878" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-113.png 989w, https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-113-300x252.png 300w, https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-113-768x646.png 768w" sizes="auto, (max-width: 989px) 100vw, 989px" /><figcaption class="wp-element-caption">图7</figcaption></figure>
</div>

<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="989" height="965" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-112.png" alt="" class="wp-image-2877" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-112.png 989w, https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-112-300x293.png 300w, https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-112-768x749.png 768w" sizes="auto, (max-width: 989px) 100vw, 989px" /><figcaption class="wp-element-caption">图8</figcaption></figure>
</div>

<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="848" height="502" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-111.png" alt="" class="wp-image-2876" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-111.png 848w, https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-111-300x178.png 300w, https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-111-768x455.png 768w" sizes="auto, (max-width: 848px) 100vw, 848px" /><figcaption class="wp-element-caption">图9</figcaption></figure>
</div>


<p>6.对于UserBean文件，代码如图10所示。</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="957" height="761" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-110.png" alt="" class="wp-image-2875" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-110.png 957w, https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-110-300x239.png 300w, https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-110-768x611.png 768w" sizes="auto, (max-width: 957px) 100vw, 957px" /><figcaption class="wp-element-caption">图10</figcaption></figure>
</div>


<p>7.对于注册页面Register.jsp，代码如图11-图13所示。</p>


<div class="wp-block-image">
<figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="875" height="1024" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-109-875x1024.png" alt="" class="wp-image-2874" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-109-875x1024.png 875w, https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-109-256x300.png 256w, https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-109-768x899.png 768w, https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-109.png 989w" sizes="auto, (max-width: 875px) 100vw, 875px" /><figcaption class="wp-element-caption">图11</figcaption></figure>
</div>

<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img loading="lazy" decoding="async" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-108-929x1024.png" alt="" class="wp-image-2873" width="840" height="925" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-108-929x1024.png 929w, https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-108-272x300.png 272w, https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-108-768x846.png 768w, https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-108.png 989w" sizes="auto, (max-width: 840px) 100vw, 840px" /><figcaption class="wp-element-caption">图12</figcaption></figure>
</div>

<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="254" height="127" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-107.png" alt="" class="wp-image-2872"/><figcaption class="wp-element-caption">图13</figcaption></figure>
</div>


<p>8.对于注册成功页面loginSuccess.jsp，代码如图14-图15所示。</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="989" height="900" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-106.png" alt="" class="wp-image-2871" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-106.png 989w, https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-106-300x273.png 300w, https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-106-768x699.png 768w" sizes="auto, (max-width: 989px) 100vw, 989px" /><figcaption class="wp-element-caption">图14</figcaption></figure>
</div>

<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="713" height="424" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-105.png" alt="" class="wp-image-2870" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-105.png 713w, https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-105-300x178.png 300w" sizes="auto, (max-width: 713px) 100vw, 713px" /><figcaption class="wp-element-caption">图15</figcaption></figure>
</div>


<p></p>



<p><strong>五、实验结果与分析</strong></p>



<p>1.对于普通用户注册界面，如图16所示。</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="684" height="453" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-104.png" alt="" class="wp-image-2869" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-104.png 684w, https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-104-300x199.png 300w" sizes="auto, (max-width: 684px) 100vw, 684px" /><figcaption class="wp-element-caption">图16</figcaption></figure>
</div>


<p></p>



<p>2.在图16中点击“注册”，按钮，可以正常注册，使用了ControllerServlet，结果如图17所示。</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="815" height="209" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-103.png" alt="" class="wp-image-2868" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-103.png 815w, https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-103-300x77.png 300w, https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-103-768x197.png 768w" sizes="auto, (max-width: 815px) 100vw, 815px" /><figcaption class="wp-element-caption">图17</figcaption></figure>
</div>


<p></p>



<p>3.在3秒后，跳转到了登录成功界面，结果如图18所示。</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="804" height="322" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-102.png" alt="" class="wp-image-2867" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-102.png 804w, https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-102-300x120.png 300w, https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-102-768x308.png 768w" sizes="auto, (max-width: 804px) 100vw, 804px" /><figcaption class="wp-element-caption">图18</figcaption></figure>
</div>


<p></p>



<p>4.返回注册页面，再次以同样信息注册，会提示注册用户存在，如图19所示。</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="740" height="464" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-101.png" alt="" class="wp-image-2866" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-101.png 740w, https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-101-300x188.png 300w" sizes="auto, (max-width: 740px) 100vw, 740px" /><figcaption class="wp-element-caption">图19</figcaption></figure>
</div>


<p><strong>六、附件下载</strong></p>



<div class="wp-block-file"><a id="wp-block-file--media-1c4613d2-ea8c-40d8-b579-0d16be815040" href="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/EX6.7z">EX6</a><a href="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/EX6.7z" class="wp-block-file__button wp-element-button" download aria-describedby="wp-block-file--media-1c4613d2-ea8c-40d8-b579-0d16be815040">下载</a></div>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>H30617-实验7-JDBC网站用户登录功能设计</title>
		<link>https://www.leexinghai.com/aic/h30617-%e5%ae%9e%e9%aa%8c7-jdbc%e7%bd%91%e7%ab%99%e7%94%a8%e6%88%b7%e7%99%bb%e5%bd%95%e5%8a%9f%e8%83%bd%e8%ae%be%e8%ae%a1/</link>
		
		<dc:creator><![CDATA[李星海]]></dc:creator>
		<pubDate>Mon, 12 Jun 2023 11:37:12 +0000</pubDate>
				<category><![CDATA[WEB应用开发]]></category>
		<guid isPermaLink="false">https://aic.leexinghai.com/?p=2843</guid>

					<description><![CDATA[一、实验目的 二、实验环境  IDEA2019、Windows10、Servlet、JSP、JavaBean [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>一、<strong>实验目的</strong></p>



<ol class="wp-block-list">
<li>掌握JDBC操作数据库的步骤。</li>



<li>熟悉 PreparedStatement和Statement对象的使用方法。</li>



<li>掌握ResultSet对象的使用。</li>



<li>掌握释放数据库资源方法。</li>
</ol>



<p><strong>二、实验环境</strong><strong></strong></p>



<p> IDEA2019、Windows10、Servlet、JSP、JavaBean、JDBC、Mysql。</p>



<p><strong>三、实验步骤</strong></p>



<p>（1）设计登录页面，提交登录信息到控制层。Servlet获取登录页面的username和password。</p>



<p>（2）遍历数据库中数据表，是否存在username，存在则继续执行程序，不存在则结束程序。</p>



<p>（3）遍历数据库中数据表，查找对应username的password，判断password是否与登录页面的password一致，一致则完成登录，不一致则跳出。</p>



<p>（4）数据库资源允许的并发访问连接数量有限，因此，当数据库资源使用完毕后，一定要释放资源。</p>



<p><strong>四、实验过程</strong></p>



<p>0.本次实验数据库版本为8.0.33（JDBC驱动也为8.0.33）如果您下载了附件，且数据库版本不一致，请替换为相应版本的JDBC驱动。数据库用户名为root，密码为123456.</p>



<p>1.本次实验使用的数据库详情如图1所示，列结构如图2所示。</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="989" height="767" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-87.png" alt="" class="wp-image-2844" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-87.png 989w, https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-87-300x233.png 300w, https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-87-768x596.png 768w" sizes="auto, (max-width: 989px) 100vw, 989px" /><figcaption class="wp-element-caption">图1</figcaption></figure>
</div>


<p></p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="912" height="304" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-88.png" alt="" class="wp-image-2845" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-88.png 912w, https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-88-300x100.png 300w, https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-88-768x256.png 768w" sizes="auto, (max-width: 912px) 100vw, 912px" /><figcaption class="wp-element-caption">图2</figcaption></figure>
</div>


<p></p>



<p>2.本次实验文件结构如图3所示。</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="523" height="660" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-89.png" alt="" class="wp-image-2846" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-89.png 523w, https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-89-238x300.png 238w" sizes="auto, (max-width: 523px) 100vw, 523px" /><figcaption class="wp-element-caption">图3</figcaption></figure>
</div>


<p></p>



<p>3.对于index.jsp，代码如图4所示。</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="989" height="519" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-90.png" alt="" class="wp-image-2847" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-90.png 989w, https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-90-300x157.png 300w, https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-90-768x403.png 768w" sizes="auto, (max-width: 989px) 100vw, 989px" /><figcaption class="wp-element-caption">图4</figcaption></figure>
</div>


<p></p>



<p>4.对于SQL_UNIT类文件，代码如图5所示。</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="989" height="762" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-91.png" alt="" class="wp-image-2848" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-91.png 989w, https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-91-300x231.png 300w, https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-91-768x592.png 768w" sizes="auto, (max-width: 989px) 100vw, 989px" /><figcaption class="wp-element-caption">图5</figcaption></figure>
</div>


<p></p>



<p>5.对于DB_UNIT文件，代码如图6所示。</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="989" height="753" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-92.png" alt="" class="wp-image-2849" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-92.png 989w, https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-92-300x228.png 300w, https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-92-768x585.png 768w" sizes="auto, (max-width: 989px) 100vw, 989px" /><figcaption class="wp-element-caption">图6</figcaption></figure>
</div>


<p></p>



<p>6.对于接收用户输入的Servlet控件loginServlet，代码如图7所示。</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="989" height="753" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-93.png" alt="" class="wp-image-2850" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-93.png 989w, https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-93-300x228.png 300w, https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-93-768x585.png 768w" sizes="auto, (max-width: 989px) 100vw, 989px" /><figcaption class="wp-element-caption">图7</figcaption></figure>
</div>


<p></p>



<p>7.对于进行输入数据传递到数据库进行处理的控件LoginServlet，代码如图8所示。</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="989" height="763" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-94.png" alt="" class="wp-image-2851" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-94.png 989w, https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-94-300x231.png 300w, https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-94-768x593.png 768w" sizes="auto, (max-width: 989px) 100vw, 989px" /><figcaption class="wp-element-caption">图8</figcaption></figure>
</div>


<p>8.User类如图9所示。</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="904" height="960" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-95.png" alt="" class="wp-image-2852" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-95.png 904w, https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-95-283x300.png 283w, https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-95-768x816.png 768w" sizes="auto, (max-width: 904px) 100vw, 904px" /><figcaption class="wp-element-caption">图9</figcaption></figure>
</div>


<p></p>



<p><strong>五、实验结果与分析</strong><strong></strong></p>



<p>1.根据图1数据库的用户信息，输入符合要求的用户名和密码，如图10所示。</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="676" height="320" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-96.png" alt="" class="wp-image-2853" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-96.png 676w, https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-96-300x142.png 300w" sizes="auto, (max-width: 676px) 100vw, 676px" /><figcaption class="wp-element-caption">图10</figcaption></figure>
</div>


<p></p>



<p>2.以图10中正确信息登录，回显“用户名”及“登录成功”字样，结果如图11所示。</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="673" height="185" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-97.png" alt="" class="wp-image-2854" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-97.png 673w, https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-97-300x82.png 300w" sizes="auto, (max-width: 673px) 100vw, 673px" /><figcaption class="wp-element-caption">图11</figcaption></figure>
</div>


<p></p>



<p>3.以图10中错误密码登录，回显“密码错误”字样，结果如图12所示。</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="574" height="219" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-98.png" alt="" class="wp-image-2855" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-98.png 574w, https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-98-300x114.png 300w" sizes="auto, (max-width: 574px) 100vw, 574px" /><figcaption class="wp-element-caption">图12</figcaption></figure>
</div>


<p>4.以图13为例输入图1中不存在的用户信息，回显“用户不存在”字样，结果如图14所示。</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="594" height="306" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-99.png" alt="" class="wp-image-2856" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-99.png 594w, https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-99-300x155.png 300w" sizes="auto, (max-width: 594px) 100vw, 594px" /><figcaption class="wp-element-caption">图13</figcaption></figure>
</div>

<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="511" height="230" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-100.png" alt="" class="wp-image-2857" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-100.png 511w, https://www.leexinghai.com/aic/wp-content/uploads/2023/06/image-100-300x135.png 300w" sizes="auto, (max-width: 511px) 100vw, 511px" /><figcaption class="wp-element-caption">图14</figcaption></figure>
</div>


<p><strong>六、附件下载</strong></p>



<div class="wp-block-file"><a id="wp-block-file--media-fcda4777-8c2d-40dc-8450-bca6161239cd" href="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/JDBCEX7.7z">JDBCEX7</a><a href="https://www.leexinghai.com/aic/wp-content/uploads/2023/06/JDBCEX7.7z" class="wp-block-file__button wp-element-button" download aria-describedby="wp-block-file--media-fcda4777-8c2d-40dc-8450-bca6161239cd">下载</a></div>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>H30609-实验5-模拟购物车功能的设计</title>
		<link>https://www.leexinghai.com/aic/h30609-%e5%ae%9e%e9%aa%8c5-%e6%a8%a1%e6%8b%9f%e8%b4%ad%e7%89%a9%e8%bd%a6%e5%8a%9f%e8%83%bd%e7%9a%84%e8%ae%be%e8%ae%a1/</link>
		
		<dc:creator><![CDATA[李星海]]></dc:creator>
		<pubDate>Wed, 31 May 2023 09:08:07 +0000</pubDate>
				<category><![CDATA[WEB应用开发]]></category>
		<guid isPermaLink="false">https://aic.leexinghai.com/?p=2713</guid>

					<description><![CDATA[一、实验目的 二、实验环境 IDEA2019、Windows10、Servlet、HTML。 三、实验步骤 （ [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p><strong>一、实验目的</strong><strong></strong></p>



<ol class="wp-block-list">
<li>熟练使用集合中数据的操作方法，如保存、遍历蛋糕对象（Cake）。</li>



<li>掌握运用Servlet动态展示数据列表的方法。</li>



<li>掌握创建Session对象的方法，并能设置或获取会话数据。</li>



<li>掌握设置Session和Cookie生命周期的方法。</li>
</ol>



<p><strong>二、实验环境</strong><strong></strong></p>



<p>IDEA2019、Windows10、Servlet、HTML。</p>



<p><strong>三、</strong>实验步骤</p>



<p>（1）以购买蛋糕为例,首先创建蛋糕对象（包括属性和方法），并存储到MAP集合中。</p>



<p>（2）运用Servlet展示集合中的所有蛋糕列表，增加超级链接。</p>



<p>（3）通过URL地址栏发送请求，并传送ID参数，Servlet判断id值，如果存在，则创建Session对象和购物车对象，并将选择的蛋糕加入到购物车，否则重定向到蛋糕列表。</p>



<p>（4）为确保Session对象的有效性，要相应的设置“JSESSIONID”的Cookie 有效周期的与Session一致。</p>



<p>（5）Servlet遍历购物车的数据，展示所有购买的蛋糕。</p>



<p>模拟购物的整个流程如下：</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="381" height="677" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-294.png" alt="" class="wp-image-2715" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-294.png 381w, https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-294-169x300.png 169w" sizes="auto, (max-width: 381px) 100vw, 381px" /><figcaption class="wp-element-caption">图0-模拟购物车流程图</figcaption></figure>
</div>


<p><strong>四、实验过程（关键代码）</strong></p>



<p>1.对于蛋糕属性和方法的定义，具体代码如图1所示。</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="865" height="700" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-295.png" alt="" class="wp-image-2716" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-295.png 865w, https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-295-300x243.png 300w, https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-295-768x622.png 768w" sizes="auto, (max-width: 865px) 100vw, 865px" /><figcaption class="wp-element-caption">图1</figcaption></figure>
</div>


<p></p>



<p>2.对于购买的操作，文件名为PurchaseServlet，代码内容如图2所示。</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="865" height="722" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-296.png" alt="" class="wp-image-2717" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-296.png 865w, https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-296-300x250.png 300w, https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-296-768x641.png 768w" sizes="auto, (max-width: 865px) 100vw, 865px" /><figcaption class="wp-element-caption">图2</figcaption></figure>
</div>


<p></p>



<p>3.因为是简单模拟，所以创建一个CakeDB的类文件来模拟数据库，其代码内容如图3所示。</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="865" height="614" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-297.png" alt="" class="wp-image-2718" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-297.png 865w, https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-297-300x213.png 300w, https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-297-768x545.png 768w" sizes="auto, (max-width: 865px) 100vw, 865px" /><figcaption class="wp-element-caption">图3</figcaption></figure>
</div>


<p></p>



<p>4.对于本次实验的首页入口，名为ListCakeServlet，其代码如图4所示。</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="865" height="586" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-298.png" alt="" class="wp-image-2719" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-298.png 865w, https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-298-300x203.png 300w, https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-298-768x520.png 768w" sizes="auto, (max-width: 865px) 100vw, 865px" /><figcaption class="wp-element-caption">图4</figcaption></figure>
</div>


<p></p>



<p>5.对于购物车相关操作，文件名为CartServlet，代码内容如图5所示。</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="865" height="633" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-299.png" alt="" class="wp-image-2720" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-299.png 865w, https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-299-300x220.png 300w, https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-299-768x562.png 768w" sizes="auto, (max-width: 865px) 100vw, 865px" /><figcaption class="wp-element-caption">图5</figcaption></figure>
</div>


<p></p>



<p><strong>五、实验结果与分析</strong></p>



<p>1.运行项目，通过在URL末端输入项目首页入口ListCakeServlet，可以显示蛋糕列表，如图6所示。</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="616" height="367" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-300.png" alt="" class="wp-image-2721" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-300.png 616w, https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-300-300x179.png 300w" sizes="auto, (max-width: 616px) 100vw, 616px" /><figcaption class="wp-element-caption">图6</figcaption></figure>
</div>


<p></p>



<p>2.在图6所示的界面中点击B类蛋糕的“点击购买”按钮，此时跳转到了购物车的页面，即为CartServlet，结果如图7所示。</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="800" height="279" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-301.png" alt="" class="wp-image-2722" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-301.png 800w, https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-301-300x105.png 300w, https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-301-768x268.png 768w" sizes="auto, (max-width: 800px) 100vw, 800px" /><figcaption class="wp-element-caption">图7</figcaption></figure>
</div>


<p></p>



<p>3.单击后退按钮，再次点击“D类蛋糕”右侧的“点击购买”按钮，此时会返回到购物车的页面，同时D类蛋糕增加到购物车中，结果如图8所示。</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="794" height="297" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-302.png" alt="" class="wp-image-2723" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-302.png 794w, https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-302-300x112.png 300w, https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-302-768x287.png 768w" sizes="auto, (max-width: 794px) 100vw, 794px" /><figcaption class="wp-element-caption">图8</figcaption></figure>
</div>


<h2 class="wp-block-heading">六、附件下载</h2>



<div class="wp-block-file"><a id="wp-block-file--media-71d2695e-777e-4af7-88d2-86ae129528f4" href="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/实验5参考代码.7z">实验5参考代码</a><a href="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/实验5参考代码.7z" class="wp-block-file__button wp-element-button" download aria-describedby="wp-block-file--media-71d2695e-777e-4af7-88d2-86ae129528f4">下载</a></div>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>H30531-实验4-请求对象获取中文内容及重定向设计</title>
		<link>https://www.leexinghai.com/aic/h30531-%e5%ae%9e%e9%aa%8c4-%e8%af%b7%e6%b1%82%e5%af%b9%e8%b1%a1%e8%8e%b7%e5%8f%96%e4%b8%ad%e6%96%87%e5%86%85%e5%ae%b9%e5%8f%8a%e9%87%8d%e5%ae%9a%e5%90%91%e8%ae%be%e8%ae%a1/</link>
		
		<dc:creator><![CDATA[李星海]]></dc:creator>
		<pubDate>Wed, 31 May 2023 09:01:11 +0000</pubDate>
				<category><![CDATA[WEB应用开发]]></category>
		<guid isPermaLink="false">https://aic.leexinghai.com/?p=2703</guid>

					<description><![CDATA[一、实验目的 二、实验环境 IDEA2019、Windows10、Servlet、HTML。 三、实验步骤 （ [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p><strong>一、实验目的</strong><strong></strong></p>



<ol class="wp-block-list">
<li>掌握Servlet容器请求对象获取表单数据方法， 如请求对象getParameter()方法获取用户、密码等。</li>



<li>熟悉设置HttpServletRequest接口请求对象的<a>中文字符</a>编码方法setCharacterEncoding(<strong>"utf-8"</strong>)，正确获取请求信息中文内容。</li>



<li>熟悉Servlet对象获取数据并进行比较检测的方法。</li>



<li>掌握响应对象实现网页重定向的应用。</li>
</ol>



<p><strong>二、实验环境</strong><strong></strong></p>



<p> IDEA2019、Windows10、Servlet、HTML。</p>



<p><strong>三、</strong>实验步骤</p>



<p>（1）在chapter04项目的web根目录下编写一个表单文件login.html，如图:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="489" height="126" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-287.png" alt="" class="wp-image-2705" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-287.png 489w, https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-287-300x77.png 300w" sizes="auto, (max-width: 489px) 100vw, 489px" /></figure>



<p>（2）通过HttpServletRequest接口获取表单信息，如<code>getParameter()</code>方法用于获取某个指定的参数、<code>getParameterValues()</code>方法用于获取多个同名的参数等。</p>



<p>（3）为使服务器正常获得中文数据，需要使用HttpServletRequest接口设置请求对象中文字符解码方法：<code>setCharacterEncoding(<strong>"utf-8"</strong>)</code>，同时使中文正常显示，需要在响应对象中设置<code>setContentType(<strong>"text/html;charset=utf-8"</strong>)</code>方法。</p>



<p>（4）模拟登录数据，用户名：“张三”，密码：“123456”为正确登录的数据，如果用户名和密码检测正确，则请求转发给“<code>urlpatterns=/sucess</code>”的servlet对象并显示“张三欢迎您访问我们的网站！”，否则，重定向到原login.html登录页面。</p>



<p><strong>四、实验过程</strong></p>



<p>1.对于负责登录表单的index.jsp，代码如图1所示。</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="989" height="699" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-288.png" alt="" class="wp-image-2706" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-288.png 989w, https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-288-300x212.png 300w, https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-288-768x543.png 768w" sizes="auto, (max-width: 989px) 100vw, 989px" /><figcaption class="wp-element-caption">图1</figcaption></figure>
</div>


<p></p>



<p>2.对于处理登录操作的LoginServlet，代码如图2所示。</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="989" height="690" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-289.png" alt="" class="wp-image-2707" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-289.png 989w, https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-289-300x209.png 300w, https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-289-768x536.png 768w" sizes="auto, (max-width: 989px) 100vw, 989px" /><figcaption class="wp-element-caption">图2</figcaption></figure>
</div>


<p></p>



<p><strong>五、实验结果与分析</strong></p>



<p>1.运行Tomcat，此时会自动进入index.jsp文件，输入指定好的用户名张三和指定密码123456，完成输入的内容如图3所示。</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="646" height="449" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-290.png" alt="" class="wp-image-2708" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-290.png 646w, https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-290-300x209.png 300w" sizes="auto, (max-width: 646px) 100vw, 646px" /><figcaption class="wp-element-caption">图3</figcaption></figure>
</div>


<p></p>



<p>2.点击图1中的“登录”按钮，可以正常登录，结果如图4所示。</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="989" height="220" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-291.png" alt="" class="wp-image-2709" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-291.png 989w, https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-291-300x67.png 300w, https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-291-768x171.png 768w" sizes="auto, (max-width: 989px) 100vw, 989px" /><figcaption class="wp-element-caption">图4</figcaption></figure>
</div>


<p></p>



<p>3.现在测试输入错误信息的结果：再次打开项目主页，此时观察URL栏是没有提示有index.jsp的，是默认路径，此时在用户名和密码文本框中输入任意信息，输入完成的结果如图5所示。</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="899" height="584" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-292.png" alt="" class="wp-image-2710" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-292.png 899w, https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-292-300x195.png 300w, https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-292-768x499.png 768w" sizes="auto, (max-width: 899px) 100vw, 899px" /><figcaption class="wp-element-caption">图5</figcaption></figure>
</div>


<p></p>



<p>4.点击登录按钮，因为数据库中没有相应的用户信息，且页面设置了重定向，重定向到index.jsp文件，此时观察URL栏，发现有了文件路径，如图6所示。</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="938" height="544" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-293.png" alt="" class="wp-image-2711" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-293.png 938w, https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-293-300x174.png 300w, https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-293-768x445.png 768w" sizes="auto, (max-width: 938px) 100vw, 938px" /><figcaption class="wp-element-caption">图6</figcaption></figure>
</div>


<p></p>



<h2 class="wp-block-heading">六、附件下载</h2>



<div class="wp-block-file"><a id="wp-block-file--media-aabcf3b8-966c-4a35-a44c-40ff3904fb24" href="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/实验4参考代码.7z">实验4参考代码</a><a href="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/实验4参考代码.7z" class="wp-block-file__button wp-element-button" download aria-describedby="wp-block-file--media-aabcf3b8-966c-4a35-a44c-40ff3904fb24">下载</a></div>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>H30529D-实验3-蛋糕商城注册</title>
		<link>https://www.leexinghai.com/aic/h30529d-%e5%ae%9e%e9%aa%8c3-%e8%9b%8b%e7%b3%95%e5%95%86%e5%9f%8e%e6%b3%a8%e5%86%8c/</link>
		
		<dc:creator><![CDATA[李星海]]></dc:creator>
		<pubDate>Wed, 31 May 2023 08:56:50 +0000</pubDate>
				<category><![CDATA[WEB应用开发]]></category>
		<guid isPermaLink="false">https://aic.leexinghai.com/?p=2693</guid>

					<description><![CDATA[一、实验目的 二、实验环境 IDEA2019、Windows10、Bootstrap、jQuery。 三、实验 [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p><strong>一、实验目的</strong><strong></strong></p>



<ol class="wp-block-list">
<li>利用Bootstrap、jQuery、Html、CSS等设计蛋糕商城页面。</li>



<li>掌握Bootstrap框架中导航条的设计方法以及列表、表单的创建操作方法。</li>



<li>掌握jQuery动态效果的设计。</li>



<li>熟悉页面布局的设计。</li>
</ol>



<p><strong>二、实验环境</strong><strong></strong></p>



<p>IDEA2019、Windows10、Bootstrap、jQuery。</p>



<p><strong>三、</strong>实验要求</p>



<p>根据本章中所学的网页知识，实现一个蛋糕商城注册页面，要求如下：页面主要分为3部分，第一部分为导航内容，有首页、商品分类、热销、新品、注册、登录、搜索及购物车等信息；第二部分为注册内容，有标题、注册表单、提交按钮等信息；第三部分为友情链接与作者署名内容。页面展示效果如下所示。</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1020" height="597" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-286.png" alt="" class="wp-image-2700" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-286.png 1020w, https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-286-300x176.png 300w, https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-286-768x450.png 768w" sizes="auto, (max-width: 1020px) 100vw, 1020px" /></figure>



<p><strong>四、实验过程</strong></p>



<p>1.本次实验代码如图1-图4所示。</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="1019" height="714" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-285.png" alt="" class="wp-image-2699" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-285.png 1019w, https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-285-300x210.png 300w, https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-285-768x538.png 768w" sizes="auto, (max-width: 1019px) 100vw, 1019px" /><figcaption class="wp-element-caption">图1</figcaption></figure>
</div>


<p></p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="1019" height="735" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-284.png" alt="" class="wp-image-2698" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-284.png 1019w, https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-284-300x216.png 300w, https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-284-768x554.png 768w" sizes="auto, (max-width: 1019px) 100vw, 1019px" /><figcaption class="wp-element-caption">图2</figcaption></figure>
</div>


<p></p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="1019" height="723" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-283.png" alt="" class="wp-image-2697" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-283.png 1019w, https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-283-300x213.png 300w, https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-283-768x545.png 768w" sizes="auto, (max-width: 1019px) 100vw, 1019px" /><figcaption class="wp-element-caption">图3</figcaption></figure>
</div>


<p></p>


<div class="wp-block-image">
<figure class="aligncenter size-full is-resized"><img loading="lazy" decoding="async" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-282.png" alt="" class="wp-image-2696" width="860" height="566" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-282.png 1019w, https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-282-300x198.png 300w, https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-282-768x506.png 768w" sizes="auto, (max-width: 860px) 100vw, 860px" /><figcaption class="wp-element-caption">图4</figcaption></figure>
</div>


<p></p>



<p><strong>五、实验结果与分析</strong></p>



<p>1.本次实验效果如图5所示。</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="1019" height="706" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-281.png" alt="" class="wp-image-2695" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-281.png 1019w, https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-281-300x208.png 300w, https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-281-768x532.png 768w" sizes="auto, (max-width: 1019px) 100vw, 1019px" /><figcaption class="wp-element-caption">图5</figcaption></figure>
</div>


<p></p>



<p>2.对于在邮箱填写区域中如果没有邮箱符号“@”，会提示错误，如图6所示。</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="970" height="893" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-280.png" alt="" class="wp-image-2694" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-280.png 970w, https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-280-300x276.png 300w, https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-280-768x707.png 768w" sizes="auto, (max-width: 970px) 100vw, 970px" /><figcaption class="wp-element-caption">图6</figcaption></figure>
</div>


<h2 class="wp-block-heading">六、附件下载</h2>



<div class="wp-block-file"><a id="wp-block-file--media-311ceb65-c907-4242-9ee9-b7a1ec176a91" href="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/实验3代码.7z">实验3代码</a><a href="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/实验3代码.7z" class="wp-block-file__button wp-element-button" download aria-describedby="wp-block-file--media-311ceb65-c907-4242-9ee9-b7a1ec176a91">下载</a></div>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>H30511-随堂练习-实验2-留言板页面设计</title>
		<link>https://www.leexinghai.com/aic/h30511-%e9%9a%8f%e5%a0%82%e7%bb%83%e4%b9%a0-%e5%ae%9e%e9%aa%8c2-%e7%95%99%e8%a8%80%e6%9d%bf%e9%a1%b5%e9%9d%a2%e8%ae%be%e8%ae%a1/</link>
		
		<dc:creator><![CDATA[李星海]]></dc:creator>
		<pubDate>Fri, 12 May 2023 04:07:19 +0000</pubDate>
				<category><![CDATA[WEB应用开发]]></category>
		<guid isPermaLink="false">https://aic.leexinghai.com/?p=2357</guid>

					<description><![CDATA[一、实验目的 二、实验环境  IDEA2019、Windows10。 三、实验要求 四、实验过程 1.本次实 [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p><strong>一、实验目的</strong><strong></strong></p>



<p><strong>二、实验环境</strong><strong></strong></p>



<p> IDEA2019、Windows10。</p>



<p><strong>三、</strong>实验要求</p>



<ul class="wp-block-list">
<li>编写一个简单的留言板页面, 动态更新内容与删除操作。</li>



<li>单击“发布”按钮，显示用户发布的留言内容。</li>



<li>在每个留言板提供一个“删除”链接，用来删除留言，并显示更新后的同容。</li>
</ul>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="865" height="441" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-55.png" alt="" class="wp-image-2358" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-55.png 865w, https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-55-300x153.png 300w, https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-55-768x392.png 768w" sizes="auto, (max-width: 865px) 100vw, 865px" /></figure>



<p><strong>四、实验过程</strong></p>



<p>1.本次实验的参考代码内容如图1所示。</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="865" height="719" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-56.png" alt="" class="wp-image-2359" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-56.png 865w, https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-56-300x249.png 300w, https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-56-768x638.png 768w" sizes="auto, (max-width: 865px) 100vw, 865px" /></figure>



<p>图1</p>



<p><strong>五、实验结果与分析</strong><strong></strong></p>



<p>2.在浏览器中运行，结果如图2-图4所示。</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="994" height="638" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-57.png" alt="" class="wp-image-2360" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-57.png 994w, https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-57-300x193.png 300w, https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-57-768x493.png 768w" sizes="auto, (max-width: 994px) 100vw, 994px" /><figcaption class="wp-element-caption">图2</figcaption></figure>
</div>

<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="976" height="590" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-58.png" alt="" class="wp-image-2361" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-58.png 976w, https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-58-300x181.png 300w, https://www.leexinghai.com/aic/wp-content/uploads/2023/05/image-58-768x464.png 768w" sizes="auto, (max-width: 976px) 100vw, 976px" /><figcaption class="wp-element-caption">图3</figcaption></figure>
</div>


<h2 class="wp-block-heading">附件下载</h2>



<div class="wp-block-file"><a id="wp-block-file--media-51313e89-4d1a-403b-a62f-703c59b2d90a" href="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/实验2.7z">实验2</a><a href="https://www.leexinghai.com/aic/wp-content/uploads/2023/05/实验2.7z" class="wp-block-file__button wp-element-button" download aria-describedby="wp-block-file--media-51313e89-4d1a-403b-a62f-703c59b2d90a">下载</a></div>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>H30508-实验一-设计人员信息登记表</title>
		<link>https://www.leexinghai.com/aic/h30508-%e5%ae%9e%e9%aa%8c%e4%b8%80-%e8%ae%be%e8%ae%a1%e4%ba%ba%e5%91%98%e4%bf%a1%e6%81%af%e7%99%bb%e8%ae%b0%e8%a1%a8/</link>
		
		<dc:creator><![CDATA[李星海]]></dc:creator>
		<pubDate>Fri, 28 Apr 2023 03:04:47 +0000</pubDate>
				<category><![CDATA[WEB应用开发]]></category>
		<guid isPermaLink="false">https://aic.leexinghai.com/?p=2233</guid>

					<description><![CDATA[一、实验目的 二、实验环境 IDEA2019、Windows10、Html5、CSS3。 三、实验要求  表 [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p><strong>一、实验目的</strong><strong></strong></p>



<ul class="wp-block-list">
<li>了解表单及其属性。</li>



<li>掌握input控件常用类型的使用。</li>



<li>熟悉textarea控件的使用。</li>



<li>熟悉select控件的使用。</li>



<li>熟悉使用CSS3美化表单。</li>
</ul>



<p><strong>二、实验环境</strong><strong></strong></p>



<p>IDEA2019、Windows10、Html5、CSS3。</p>



<p><strong>三、</strong>实验要求</p>



<p> 表单项包括文本框、文件、单选框、复选框和下拉列表等类型，有相应的提示信息、表单控件和表单域组成。实验中通过表单进行布局和设计，并使用CSS对表单进行美化（背景图片课中提供），制作出一个信息登记表模块,效果图如下：</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="908" height="418" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-168.png" alt="" class="wp-image-2234" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-168.png 908w, https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-168-300x138.png 300w, https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-168-768x354.png 768w" sizes="auto, (max-width: 908px) 100vw, 908px" /></figure>



<p><strong>四、实验过程（部分核心代码）</strong></p>



<p>1.本实验的CSS参考代码以及头部代码如图1所示。</p>


<div class="wp-block-image">
<figure class="aligncenter size-full is-resized"><img loading="lazy" decoding="async" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-178.png" alt="" class="wp-image-2252" width="840" height="772" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-178.png 865w, https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-178-300x276.png 300w, https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-178-768x707.png 768w" sizes="auto, (max-width: 840px) 100vw, 840px" /><figcaption class="wp-element-caption">图1</figcaption></figure>
</div>


<p>2.表单部分的参考代码如图2-图4所示。</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="865" height="540" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-179.png" alt="" class="wp-image-2253" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-179.png 865w, https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-179-300x187.png 300w, https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-179-768x479.png 768w" sizes="auto, (max-width: 865px) 100vw, 865px" /><figcaption class="wp-element-caption">图2</figcaption></figure>
</div>

<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="865" height="550" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-180.png" alt="" class="wp-image-2254" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-180.png 865w, https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-180-300x191.png 300w, https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-180-768x488.png 768w" sizes="auto, (max-width: 865px) 100vw, 865px" /><figcaption class="wp-element-caption">图3</figcaption></figure>
</div>

<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="865" height="476" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-181.png" alt="" class="wp-image-2255" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-181.png 865w, https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-181-300x165.png 300w, https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-181-768x423.png 768w" sizes="auto, (max-width: 865px) 100vw, 865px" /><figcaption class="wp-element-caption">图4</figcaption></figure>
</div>


<p><strong>五、实验结果与分析</strong></p>



<p>1.实验结果效果如图5所示。</p>


<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="865" height="504" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-182.png" alt="" class="wp-image-2256" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-182.png 865w, https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-182-300x175.png 300w, https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-182-768x447.png 768w" sizes="auto, (max-width: 865px) 100vw, 865px" /><figcaption class="wp-element-caption">图5</figcaption></figure>
</div>


<h2 class="wp-block-heading">附件下载</h2>



<p><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-vivid-green-cyan-color">本教程代码文件将于5月9日发布。</mark></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>H30425-制作网页设计软件列表</title>
		<link>https://www.leexinghai.com/aic/h30425-%e5%88%b6%e4%bd%9c%e7%bd%91%e9%a1%b5%e8%ae%be%e8%ae%a1%e8%bd%af%e4%bb%b6%e5%88%97%e8%a1%a8/</link>
		
		<dc:creator><![CDATA[李星海]]></dc:creator>
		<pubDate>Wed, 19 Apr 2023 10:14:34 +0000</pubDate>
				<category><![CDATA[WEB应用开发]]></category>
		<guid isPermaLink="false">https://aic.leexinghai.com/?p=2157</guid>

					<description><![CDATA[作业内容 1.制作网页设计软件列表，其默认效果如下图所示。 2.当鼠标悬浮于导航选项时，该选项的文本颜色发生变 [&#8230;]]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">作业内容</h2>



<p>1.制作网页设计软件列表，其默认效果如下图所示。</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="997" height="136" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-122.png" alt="" class="wp-image-2158" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-122.png 997w, https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-122-300x41.png 300w, https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-122-768x105.png 768w" sizes="auto, (max-width: 997px) 100vw, 997px" /><figcaption class="wp-element-caption">默认效果</figcaption></figure>



<p>2.当鼠标悬浮于导航选项时，该选项的文本颜色发生变化，且添加背景色，效果如下图所示。</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="976" height="129" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-123.png" alt="" class="wp-image-2159" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-123.png 976w, https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-123-300x40.png 300w, https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-123-768x102.png 768w" sizes="auto, (max-width: 976px) 100vw, 976px" /><figcaption class="wp-element-caption">点击效果</figcaption></figure>



<p>3.当用鼠标点击导航选项后，会出现该款软件的相关介绍，例如点击最后一个导航选项，效果如下图所示。</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="751" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-124-1024x751.png" alt="" class="wp-image-2160" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-124-1024x751.png 1024w, https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-124-300x220.png 300w, https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-124-768x563.png 768w, https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-124.png 1135w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">介绍效果</figcaption></figure>



<h2 class="wp-block-heading">参考步骤</h2>



<p>部分参考代码如下（作业提交截止后公布完整代码）</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="834" height="1024" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-125-834x1024.png" alt="" class="wp-image-2162" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-125-834x1024.png 834w, https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-125-244x300.png 244w, https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-125-768x943.png 768w, https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-125.png 1155w" sizes="auto, (max-width: 834px) 100vw, 834px" /><figcaption class="wp-element-caption">CSS部分关键代码</figcaption></figure>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="980" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-126-1024x980.png" alt="" class="wp-image-2163" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-126-1024x980.png 1024w, https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-126-300x287.png 300w, https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-126-768x735.png 768w, https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-126.png 1524w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">JS控制关键代码</figcaption></figure>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="886" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-127-1024x886.png" alt="" class="wp-image-2164" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-127-1024x886.png 1024w, https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-127-300x260.png 300w, https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-127-768x665.png 768w, https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-127-1536x1329.png 1536w, https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-127.png 1546w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">body部分参考代码</figcaption></figure>



<h2 class="wp-block-heading">效果图</h2>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="175" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-128-1024x175.png" alt="" class="wp-image-2165" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-128-1024x175.png 1024w, https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-128-300x51.png 300w, https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-128-768x131.png 768w, https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-128-1536x263.png 1536w, https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-128-2048x350.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">默认效果</figcaption></figure>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="183" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-129-1024x183.png" alt="" class="wp-image-2166" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-129-1024x183.png 1024w, https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-129-300x54.png 300w, https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-129-768x137.png 768w, https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-129-1536x274.png 1536w, https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-129-2048x365.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">悬停效果</figcaption></figure>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="600" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-130-1024x600.png" alt="" class="wp-image-2167" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-130-1024x600.png 1024w, https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-130-300x176.png 300w, https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-130-768x450.png 768w, https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-130-1536x899.png 1536w, https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-130-2048x1199.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">点击展示介绍效果</figcaption></figure>



<h2 class="wp-block-heading">附件下载</h2>



<div class="wp-block-file"><a id="wp-block-file--media-8b662259-1733-4ed5-a383-95f1756f38e6" href="https://www.leexinghai.com/aic/wp-content/uploads/2023/04/图片素材.7z">图片素材</a><a href="https://www.leexinghai.com/aic/wp-content/uploads/2023/04/图片素材.7z" class="wp-block-file__button wp-element-button" download aria-describedby="wp-block-file--media-8b662259-1733-4ed5-a383-95f1756f38e6">下载</a></div>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>H30409-电影影评网制作</title>
		<link>https://www.leexinghai.com/aic/h30409-%e7%94%b5%e5%bd%b1%e5%bd%b1%e8%af%84%e7%bd%91%e5%88%b6%e4%bd%9c/</link>
		
		<dc:creator><![CDATA[李星海]]></dc:creator>
		<pubDate>Thu, 06 Apr 2023 02:51:56 +0000</pubDate>
				<category><![CDATA[WEB应用开发]]></category>
		<guid isPermaLink="false">https://aic.leexinghai.com/?p=2016</guid>

					<description><![CDATA[作业内容 制作“电影影评网”，效果如下图所示，要求页面能适配不同屏幕，当点击“科幻电影”时，会显示动作电影的下 [&#8230;]]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">作业内容</h2>



<p>制作“电影影评网”，效果如下图所示，要求页面能适配不同屏幕，当点击“科幻电影”时，会显示动作电影的下拉菜单，如下图所示；再次点击，将下拉菜单收缩。</p>



<p>注：用到的图片素材在“资源”栏目中的“网页基础”文件夹对应的目录——1.2——images</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="619" height="425" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-26.png" alt="" class="wp-image-2017" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-26.png 619w, https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-26-300x206.png 300w" sizes="auto, (max-width: 619px) 100vw, 619px" /><figcaption class="wp-element-caption">图1-作业要求参考效果图片1</figcaption></figure>



<figure class="wp-block-image size-full is-resized"><img loading="lazy" decoding="async" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-27.png" alt="" class="wp-image-2018" width="599" height="426" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-27.png 599w, https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-27-300x213.png 300w" sizes="auto, (max-width: 599px) 100vw, 599px" /><figcaption class="wp-element-caption">图2-作业要求参考效果图片2</figcaption></figure>



<h2 class="wp-block-heading">参考步骤</h2>



<p>本次作业参考代码见图3-图5（也可以从附件下载）</p>



<h2 class="wp-block-heading"><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-pale-pink-color">请自行修改部分显示参数或文本！！！</mark></h2>



<h2 class="wp-block-heading"><mark style="background-color:rgba(0, 0, 0, 0)" class="has-inline-color has-vivid-red-color">（被判定作弊后果自负）</mark></h2>



<figure class="wp-block-image size-full is-resized"><img loading="lazy" decoding="async" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-28.png" alt="" class="wp-image-2019" width="840" height="799" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-28.png 865w, https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-28-300x285.png 300w, https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-28-768x731.png 768w" sizes="auto, (max-width: 840px) 100vw, 840px" /><figcaption class="wp-element-caption">图3-参考代码1</figcaption></figure>



<figure class="wp-block-image size-full is-resized"><img loading="lazy" decoding="async" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-29.png" alt="" class="wp-image-2020" width="840" height="527" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-29.png 865w, https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-29-300x188.png 300w, https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-29-768x482.png 768w" sizes="auto, (max-width: 840px) 100vw, 840px" /><figcaption class="wp-element-caption">图4-参考代码2</figcaption></figure>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="865" height="85" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-30.png" alt="" class="wp-image-2021" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-30.png 865w, https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-30-300x29.png 300w, https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-30-768x75.png 768w" sizes="auto, (max-width: 865px) 100vw, 865px" /><figcaption class="wp-element-caption">图5-参考代码3</figcaption></figure>



<h2 class="wp-block-heading">参考效果</h2>



<p>全屏显示效果（图6-图7）：</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="865" height="541" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-31.png" alt="" class="wp-image-2022" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-31.png 865w, https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-31-300x188.png 300w, https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-31-768x480.png 768w" sizes="auto, (max-width: 865px) 100vw, 865px" /><figcaption class="wp-element-caption">图6-全屏显示效果1</figcaption></figure>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="865" height="371" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-32.png" alt="" class="wp-image-2023" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-32.png 865w, https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-32-300x129.png 300w, https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-32-768x329.png 768w" sizes="auto, (max-width: 865px) 100vw, 865px" /><figcaption class="wp-element-caption">图7-全屏显示效果2</figcaption></figure>



<p>小屏幕自适应宽度显示：</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="590" height="1024" src="https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-33-590x1024.png" alt="" class="wp-image-2024" srcset="https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-33-590x1024.png 590w, https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-33-173x300.png 173w, https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-33-768x1332.png 768w, https://www.leexinghai.com/aic/wp-content/uploads/2023/04/image-33.png 781w" sizes="auto, (max-width: 590px) 100vw, 590px" /><figcaption class="wp-element-caption">图8-小屏幕宽度显示</figcaption></figure>



<h2 class="wp-block-heading">代码附件下载</h2>



<div class="wp-block-file"><a id="wp-block-file--media-ae47096a-c204-4136-bfa9-5d881ee3b286" href="https://www.leexinghai.com/aic/wp-content/uploads/2023/04/电影影评网代码附件.7z">电影影评网代码附件</a><a href="https://www.leexinghai.com/aic/wp-content/uploads/2023/04/电影影评网代码附件.7z" class="wp-block-file__button wp-element-button" download aria-describedby="wp-block-file--media-ae47096a-c204-4136-bfa9-5d881ee3b286">下载</a></div>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>R30224-Web应用开发课程参考材料(本门户)</title>
		<link>https://www.leexinghai.com/aic/r30224-web%e5%ba%94%e7%94%a8%e5%bc%80%e5%8f%91%e8%af%be%e7%a8%8b%e5%8f%82%e8%80%83%e6%9d%90%e6%96%99%e7%ab%99%e7%82%b9%e5%86%85/</link>
		
		<dc:creator><![CDATA[李星海]]></dc:creator>
		<pubDate>Fri, 24 Feb 2023 08:11:19 +0000</pubDate>
				<category><![CDATA[WEB应用开发]]></category>
		<guid isPermaLink="false">https://aic.leexinghai.com/?p=1853</guid>

					<description><![CDATA[在大专学的（学的不是很深，但是参考也足够了）： https://www.leexinghai.com/aic/ [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>在大专学的（学的不是很深，但是参考也足够了）：</p>



<p><a href="https://www.leexinghai.com/aic/category/gdgm/21221/java-web/">https://www.leexinghai.com/aic/category/gdgm/21221/java-web/</a></p>



<p></p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
