1、引言
設(shè)計(jì)結(jié)課作業(yè),課程設(shè)計(jì)無處下手,網(wǎng)頁要求的總數(shù)量太多?沒有合適的模板?數(shù)據(jù)庫,java,python,vue,html作業(yè)復(fù)雜工程量過大?畢設(shè)毫無頭緒等等一系列問題。你想要解決的問題,在微信公眾號“coding加油站”中全部會得到解決
2、作品介紹
原生js實(shí)現(xiàn)的圖書館管理系統(tǒng)采用html,css,js技術(shù)來實(shí)現(xiàn),符合所學(xué)知識體系,適用于常見的作業(yè)以及課程設(shè)計(jì),需要獲取更多的作品,請關(guān)注微信公眾號:coding加油站,獲取,如需更多資料,可在微信后臺留言。歡迎大家來提問,交流學(xué)習(xí)。
2.1、作品簡介方面?
原生js實(shí)現(xiàn)的圖書館管理系統(tǒng)采用常規(guī)方式來實(shí)現(xiàn),符合絕大部分的要求。代碼配置有相關(guān)文檔講解,如需從代碼中學(xué)到知識點(diǎn),那么這個作品將是你的不二之選
2.2、作品二次開發(fā)工具
此作品代碼相對簡單,基本使用課堂中所學(xué)知識點(diǎn)來完成,只需要修改相關(guān)的介紹文字,一些圖片,就可以改為自己獨(dú)一無二的代碼,網(wǎng)頁作品下載后可使用任意編輯軟件(例如:DW、HBuilder、NotePAD 、Vscode 、Sublime 、Webstorm 所有編輯器均可使用),java,python等相關(guān)作業(yè)使用自己常使用的工具亦可完成相關(guān)二次開發(fā)。
2.3、作品技術(shù)介紹
html網(wǎng)頁作品技術(shù)方面:使用CSS制作了網(wǎng)頁背景圖、鼠標(biāo)經(jīng)過及選中導(dǎo)航變色效果、下劃線等相關(guān)技術(shù)來美化相關(guān)界面,部分采用了javascript來做校驗(yàn)。 使用html5,以及css3等相關(guān)技術(shù)完成技術(shù)的布局,在本作品中,會使用常見的布局,常見的浮動布局,flex布局都會有使用到哦。同時在操作方面上運(yùn)用了html5和css3,采用了div+css結(jié)構(gòu)、表單、超鏈接、浮動、絕對定位、相對定位、字體樣式、引用視頻等基礎(chǔ)知識,同時使用了一些js的相關(guān)知識。例如使用到了dom,和bom來獲取瀏覽器的相關(guān)api,同時使用css對樣式進(jìn)行相關(guān)的美化,使得界面更加符合網(wǎng)頁設(shè)計(jì)
3、作品演示
【coding加油站】原生js實(shí)現(xiàn)的圖書管理系統(tǒng)
3.1、登錄頁
?相關(guān)代碼:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>1</title>
<style>
.div1{
width:400px;
height:220px;
margin:0 auto;
position:absolute;
left:40%;
top:35%;
background: none repeat scroll 0 0 skyblue;
border: 1px solid brown;
height: 250px;
padding-top: 30px;
text-align: center;
}
</style>
</head>
<body>
<div class="bg"></div>
<div class="div1" id="loginBox">
<form action="LoginServlet" method="post">
<h3>圖書管理系統(tǒng)</h3>
<p>
<input type="text" name="username" id="username" placeholder="賬號" autocomplete="off"></p>
<p>
<input type="password" name="password" id="password" placeholder="密碼">
</p>
<p style="color: red" class="tip"></p>
<p><button type="button" id="login">登錄</button></p>
</form>
<span><a href="3.html" style="color: brown">注冊</a></span>
</div>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript">
$(function(){
$('#login').click(function(){
username = $('.div1 #username').val();
password = $('.div1 #password').val();
if(username!='admin'||password!='admin'){
$('.div1 .tip').text('用戶名或密碼錯誤');
if(username!=''||password!=''){
$('.div1 .tip').text('用戶名或密碼不能為空');
}
}else{
console.log('下一步');
alert('用戶登陸成功')
window.location.href="2.html";
}
});
});
</script>
</body>
</html>
3.2、管理界面
相關(guān)代碼:
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>2</title>
<style>
#div1{
background-color: skyblue;
width: auto;
height:70px;
font-size: 30px;
text-align: center;
line-height: 70px;
}
.modal {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 1050;
display: none;
overflow: hidden;
outline: 0;
}
.modal.fade .modal-dialog {
transition: -webkit-transform 0.3s ease-out;
transition: transform 0.3s ease-out;
transition: transform 0.3s ease-out, -webkit-transform 0.3s ease-out;
-webkit-transform: translate(0, -25%);
transform: translate(0, -25%);
}
.modal.show .modal-dialog {
-webkit-transform: translate(0, 0);
transform: translate(0, 0);
}
.modal-open .modal {
overflow-x: hidden;
overflow-y: auto;
}
.modal-dialog {
position: relative;
width: auto;
margin: 10px;
pointer-events: none;
}
.modal-content {
position: relative;
display: -ms-flexbox;
display: flex;
-ms-flex-direction: column;
flex-direction: column;
pointer-events: auto;
background-color: #fff
background-clip: padding-box;
border: 1px solid rgba(0, 0, 0, 0.2);
border-radius: 0.3rem;
outline: 0;
}
.modal-backdrop {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 1040;
background-color: skyblue;
}
.modal-backdrop.fade {
opacity: 0;
}
.modal-backdrop.show {
opacity: 0.5;
}
.modal-header {
display: -ms-flexbox;
display: flex;
-ms-flex-align: start;
align-items: flex-start;
-ms-flex-pack: justify;
justify-content: space-between;
padding: 15px;
border-bottom: 1px solid #e9ecef;
border-top-left-radius: 0.3rem;
border-top-right-radius: 0.3rem;
}
.modal-header .close {
padding: 15px;
margin: -15px -15px -15px auto;
}
.modal-title {
margin-bottom: 0;
line-height: 1.5;
}
.modal-body {
position: relative;
-ms-flex: 1 1 auto;
flex: 1 1 auto;
padding: 15px;
}
.modal-footer {
display: -ms-flexbox;
display: flex;
-ms-flex-align: center;
align-items: center;
-ms-flex-pack: end;
justify-content: flex-end;
padding: 15px;
border-top: 1px solid #e9ecef;
}
.modal-footer > :not(:first-child) {
margin-left: .25rem;
}
.modal-footer > :not(:last-child) {
margin-right: .25rem;
}
body {
margin: 0;
font-size: 1.3rem;
font-weight: 400;
line-height: 1.5;
color: #212529;
text-align: center;
background-color: #fff;
}
.table{
background-color: skyblue;
border: 1px solid brown;
}
</style>
</head>
<body onload="loadUserDatas()">
<div id="div1">圖書管理系統(tǒng)</div>
<br><br>
<div class="container">
<table class="table" id="table" align="center">
<thead>
<tr>
<th>序號</th>
<th>圖書編號</th>
<th>圖書名</th>
<th>圖書作者</th>
<th>出版社</th>
<th>圖書數(shù)量</th>
<th>圖書價(jià)錢</th>
</tr>
</thead>
<tbody id="tbody">
</tbody>
</table>
<br>
<caption>操作</caption>
<br><br>
<caption>
<form class="form-inline" role="form">
<input type="text" class="form-group form-control" autocomplete="off" id="s_code" placeholder="按工號查詢" >
<input type="text" class="form-group form-control" autocomplete="off" id="s_userName" placeholder="按圖書名查詢" >
</form>
</caption>
<br>
<form class="form-inline" role="form">
<button type="button" class="btn btn-info" id="user_find" onclick="optionUserData(this);">查詢</button>
<button type="button" class="btn btn-success" id="user_add" data-toggle="modal"
data-target="#myModal" onclick="optionUserData(this);">新增</button>
<button type="button" class="btn btn-danger" id="user_delete" onclick="optionUserData(this);">刪除</button>
<button type="button" class="btn btn-default" id="user_edit" data-toggle="modal"
data-target="#myModal" onclick="optionUserData(this);">編輯</button>
</form>
<div class="modal hide" id="myModal" role="dialog" >
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
返回
</button>
</div>
<div class="modal-body" id="modal-body">
<label for="name">圖書編號:</label>
<input type="text" class="form-control" id="m_code" placeholder="請輸入圖書編號" autocomplete="off">
<label for="name">圖書名:</label>
<input type="text" class="form-control" id="m_userName" placeholder="請輸入圖書名" autocomplete="off">
<label for="name">圖書作者:</label>
<input type="text" class="form-control" id="m_sex" placeholder="請輸入作者" autocomplete="off">
<label for="name">出版社:</label>
<input type="text" class="form-control" id="m_passWord" placeholder="請輸入出版社" autocomplete="off">
<label for="name">圖書數(shù)量:</label>
<input type="text" class="form-control" id="m_age" placeholder="請輸入圖書數(shù)量" autocomplete="off">
<label for="name">圖書價(jià)錢:</label>
<input type="text" class="form-control" id="m_birthday" placeholder="請輸入圖書價(jià)錢" autocomplete="off">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default"
data-dismiss="modal">保存
</button>
<button type="button" class="btn btn-primary" data-dismiss="modal" aria-hidden="true" >提交更改</button>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/index.js"></script>
<script type="text/javascript" src="js/bootstrap.js"></script>
</body>
</html>
?3.3、編輯界面
相關(guān)代碼:
<div class="modal hide" id="myModal" role="dialog" >
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
返回
</button>
</div>
<div class="modal-body" id="modal-body">
<label for="name">圖書編號:</label>
<input type="text" class="form-control" id="m_code" placeholder="請輸入圖書編號" autocomplete="off">
<label for="name">圖書名:</label>
<input type="text" class="form-control" id="m_userName" placeholder="請輸入圖書名" autocomplete="off">
<label for="name">圖書作者:</label>
<input type="text" class="form-control" id="m_sex" placeholder="請輸入作者" autocomplete="off">
<label for="name">出版社:</label>
<input type="text" class="form-control" id="m_passWord" placeholder="請輸入出版社" autocomplete="off">
<label for="name">圖書數(shù)量:</label>
<input type="text" class="form-control" id="m_age" placeholder="請輸入圖書數(shù)量" autocomplete="off">
<label for="name">圖書價(jià)錢:</label>
<input type="text" class="form-control" id="m_birthday" placeholder="請輸入圖書價(jià)錢" autocomplete="off">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default"
data-dismiss="modal">保存
</button>
<button type="button" class="btn btn-primary" data-dismiss="modal" aria-hidden="true" >提交更改</button>
</div>
</div>
</div>
</div>
總結(jié)文章來源:http://www.zghlxwxcb.cn/news/detail-456418.html
以上就是本次項(xiàng)目的全部內(nèi)容,需要交流或者獲取代碼請關(guān)注微信公眾號:coding加油站獲取文章來源地址http://www.zghlxwxcb.cn/news/detail-456418.html
到了這里,關(guān)于【HTML】原生js實(shí)現(xiàn)的圖書館管理系統(tǒng)的文章就介紹完了。如果您還想了解更多內(nèi)容,請?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!