注:这里的原型是展示效果,让大家有个感性的认识,编码不在这里进行,项目开发过程会在后面的章节从零开始。
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<html>
<head>
<script src="https://how2j.cn/study/js/jquery/2.0.0/jquery.min.js"></script>
<link href="https://how2j.cn/study/css/bootstrap/3.3.6/bootstrap.min.css" rel="stylesheet">
<script src="https://how2j.cn/study/js/bootstrap/3.3.6/bootstrap.min.js"></script>
<link href="https://how2j.cn/tmall/css/back/style.css" rel="stylesheet">
<script>
function checkEmpty(id, name){
var value = $("#"+id).val();
if(value.length==0){
alert(name+ "不能为空");
$("#"+id)[0].focus();
return false;
}
return true;
}
function checkNumber(id, name){
var value = $("#"+id).val();
if(value.length==0){
alert(name+ "不能为空");
$("#"+id)[0].focus();
return false;
}
if(isNaN(value)){
alert(name+ "必须是数字");
$("#"+id)[0].focus();
return false;
}
return true;
}
function checkInt(id, name){
var value = $("#"+id).val();
if(value.length==0){
alert(name+ "不能为空");
$("#"+id)[0].focus();
return false;
}
if(parseInt(value)!=value){
alert(name+ "必须是整数");
$("#"+id)[0].focus();
return false;
}
return true;
}
$(function(){
$("a").click(function(){
var deleteLink = $(this).attr("deleteLink");
console.log(deleteLink);
if("true"==deleteLink){
var confirmDelete = confirm("确认要删除");
if(confirmDelete)
return true;
return false;
}
});
})
</script>
</head>
<body>
<div class="navitagorDiv">
<nav class="navbar navbar-default navbar-fixed-top navbar-inverse">
<img style="margin-left:10px;margin-right:0px" class="pull-left" src="https://how2j.cn/tmall/img/site/tmallbuy.png" height="45px">
<a class="navbar-brand" href="#nowhere">天猫后台</a>
<a class="navbar-brand" href="#nowhere">分类管理</a>
<a class="navbar-brand" href="#nowhere">用户管理</a>
<a class="navbar-brand" href="#nowhere">订单管理</a>
</nav>
</div>
<title>编辑产品属性值</title>
<script>
$(function() {
$("input.pvValue").keyup(function(){
var value = $(this).val();
var page = "admin_product_updatePropertyValue";
var pvid = $(this).attr("pvid");
var parentSpan = $(this).parent("span");
parentSpan.css("border","1px solid yellow");
if(false)$.post(
page,
{"value":value,"pvid":pvid},
function(result){
if("success"==result)
parentSpan.css("border","1px solid green");
else
parentSpan.css("border","1px solid red");
}
);
});
});
</script>
<div class="workingArea">
<ol class="breadcrumb">
<li><a href="#nowhere">所有分类</a></li>
<li><a href="#nowhere">太阳镜</a></li>
<li class="active">好先生同款墨镜孙红雷偏光男士太阳镜韩明星女款圆脸方框金属近视</li>
<li class="active">编辑产品属性</li>
</ol>
<div class="editPVDiv">
<div class="eachPV">
<span class="pvName" >适合脸型</span>
<span class="pvValue"><input class="pvValue" pvid="13169" type="text" value="圆脸 长脸 方脸 椭圆形脸"></span>
</div>
<div class="eachPV">
<span class="pvName" >是否可调</span>
<span class="pvValue"><input class="pvValue" pvid="13170" type="text" value="镜面弧度 镜架松紧"></span>
</div>
<div class="eachPV">
<span class="pvName" >颜色分类</span>
<span class="pvValue"><input class="pvValue" pvid="13171" type="text" value="黑框黑灰片 枪框渐灰片 银框反光膜天蓝片 金框G15片"></span>
</div>
<div class="eachPV">
<span class="pvName" >货号</span>
<span class="pvValue"><input class="pvValue" pvid="13172" type="text" value="8009"></span>
</div>
<div class="eachPV">
<span class="pvName" >镜片材质</span>
<span class="pvValue"><input class="pvValue" pvid="13173" type="text" value="其他"></span>
</div>
<div class="eachPV">
<span class="pvName" >是否商场同款</span>
<span class="pvValue"><input class="pvValue" pvid="13174" type="text" value="否"></span>
</div>
<div class="eachPV">
<span class="pvName" >眼镜配件类型</span>
<span class="pvValue"><input class="pvValue" pvid="13175" type="text" value="镜布 镜盒"></span>
</div>
<div class="eachPV">
<span class="pvName" >价格区间</span>
<span class="pvValue"><input class="pvValue" pvid="13176" type="text" value="100 - 200元"></span>
</div>
<div class="eachPV">
<span class="pvName" >风格</span>
<span class="pvValue"><input class="pvValue" pvid="13177" type="text" value="个性 舒适 运动"></span>
</div>
<div class="eachPV">
<span class="pvName" >适用性别</span>
<span class="pvValue"><input class="pvValue" pvid="13178" type="text" value="男"></span>
</div>
<div class="eachPV">
<span class="pvName" >功能</span>
<span class="pvValue"><input class="pvValue" pvid="13179" type="text" value="防UVA 防UVB 偏光"></span>
</div>
<div class="eachPV">
<span class="pvName" >型号</span>
<span class="pvValue"><input class="pvValue" pvid="13180" type="text" value="8009"></span>
</div>
<div class="eachPV">
<span class="pvName" >上市时间</span>
<span class="pvValue"><input class="pvValue" pvid="13181" type="text" value="2014年春夏季"></span>
</div>
<div class="eachPV">
<span class="pvName" >产地</span>
<span class="pvValue"><input class="pvValue" pvid="13182" type="text" value="厦门"></span>
</div>
<div class="eachPV">
<span class="pvName" >品牌</span>
<span class="pvValue"><input class="pvValue" pvid="13183" type="text" value="PARZIN/帕森"></span>
</div>
<div style="clear:both"></div>
</div>
</div>
HOW2J公众号,关注后实时获知最新的教程和优惠活动,谢谢。
提问之前请登陆
提问已经提交成功,正在审核。 请于 我的提问 处查看提问记录,谢谢
|