<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>产品</title>
</head>
<script src="https://cdn.bootcdn.net/ajax/libs/axios/1.2.3/axios.js"></script>
<!-- <script src="https://unpkg.com/axios/dist/axios.min.js"></script> -->
<style>
table{
border:1px solid #000;
border-collapse: collapse;
width: 550px;
}
th{
height: 30px;
text-align: center;
vertical-align: middle;
border:1px solid #000;
}
td{
height: 100px;
text-align: center;
vertical-align: middle;
border:1px solid #000;
}
img{
height: 100px;
width: 100px;
}
a{
color:#00ff00;
}
a:hover{
color:#ff0000;
}
tr th:nth-child(4){
background-color: #ffffd0;
}
tr td:nth-child(4){
background-color: #ffffd0;
}
tr th:nth-child(1){
width: 100px;
}
tr th:nth-child(2){
width: 150px;
}
tr th:nth-child(3){
width: 150px;
}
</style>
<body>
<div id="info">
<div><input type="text" id="product" placeholder="请输入产品名称"> <input type="button" id="search" value="搜索"></div>
<div id="product">
<table>
<tr>
<th></th>
<th>品牌</th>
<th>型号</th>
<th>价格</th>
</tr>
<tr v-for="item in list">
<td><img :src="'http://114.67.241.121:8080/img/'+item.image">
</td>
<td>{{item.brand}}</td>
<td><a href="'http://114.67.241.121:8080/img/'+item.image">{{item.model}}</a></td>
<td>{{item.price}}</td>
</tr>
</table>
</div>
</div>
</body>
<script src="./js/jquery-3.1.1.min.js"></script>
<script src="vue.js"></script>
<script type="text/javascript">
new Vue({
el:'#info',
data(){
return {
list:[],
}
},
created(){
axios({
method:'get',
url:'http://114.67.241.121:8080/product/list'
}).then(res=>{
this.list=res.data.data
})
}
})
</script>
</html>
没有合适的资源?快使用搜索试试~ 我知道了~
产品名称模拟测试web前端代码
共6个文件
js:3个
html:2个
css:1个
需积分: 10 0 下载量 87 浏览量
2023-03-28
17:43:13
上传
评论
收藏 129KB ZIP 举报
温馨提示
产品名称模拟测试web前端代码
资源推荐
资源详情
资源评论
收起资源包目录
考试文件夹.zip (6个子文件)
考试文件夹
js
jquery-3.1.1.min.js 85KB
product.html 2KB
img
css
input.css 71B
intput.html 2KB
vue.js 369KB
axios.min.js 14KB
共 6 条
- 1
资源评论
平平无奇小码手
- 粉丝: 9
- 资源: 4
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功