Created
June 16, 2014 04:12
-
-
Save codenuke/45071b995c1bf590b2d3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<link rel="stylesheet" type="text/css" href="css/theme product.css"> | |
<link rel="stylesheet" type="text/css" href="css/cssmenu.css"> | |
<link rel="stylesheet" type="text/css" href="css/work.css"> | |
<link rel="stylesheet" type="text/css" href="css/btncolor.css"> | |
<link rel="stylesheet" type="text/css" href="https://code.jquery.com/ui/1.10.4/themes/ui-lightness/jquery-ui.css"> | |
<script type="text/javascript" src="https://code.jquery.com/jquery-1.11.1.min.js"></script> | |
<script type="text/javascript" src="https://code.jquery.com/ui/1.10.4/jquery-ui.min.js"></script> | |
<script type="text/javascript" src="https://jshashtable.googlecode.com/files/jshashtable-3.0.js"></script> | |
<script type="text/javascript" src="https://jquery-numberformatter.googlecode.com/files/jquery.numberformatter-1.2.4.jsmin.js"></script> | |
<script type="text/javascript"> | |
$(function(){ | |
$("#txtuser").focus(); | |
$("#btnblack").click(function(){ | |
var url = '<img src="image/shirt/shirt black.png" style="width: 200px; height:200px;">'; | |
$("#show").html(url); | |
}); | |
$("#btnwhite").click(function(){ | |
var url = '<img src="image/shirt/shirt white.png" style="width: 200px; height:200px;">' | |
$("#show").html(url); | |
}); | |
$("#btngray").click(function(){ | |
var url = '<img src="image/shirt/shirt gray.png" style="width: 200px; height:200px;">' | |
$("#show").html(url); | |
}); | |
$("#btnblue").click(function(){ | |
var url = '<img src="image/shirt/shirt blue.png" style="width: 200px; height:200px;">' | |
$("#show").html(url); | |
}); | |
$("#btnred").click(function(){ | |
var url = '<img src="image/shirt/shirt red.png" style="width: 200px; height:200px;">' | |
$("#show").html(url); | |
}); | |
$("#btnyellow").click(function(){ | |
var url = '<img src="image/shirt/shirt yellow.png" style="width: 200px; height:200px;">' | |
$("#show").html(url); | |
}); | |
$("#btnlime").click(function(){ | |
var url = '<img src="image/shirt/shirt green.png" style="width: 200px; height:200px;">' | |
$("#show").html(url); | |
}); | |
// Grade + Price ---------------------------------------------------------------------------- | |
$("#GradeA").click(function(){ | |
$("#txtcount").removeAttr('readonly'); | |
if($("#txtcount").val() == 1) | |
{ | |
$("#GradeB").attr('checked',false); | |
$("#GradeC").attr('checked',false); | |
$("#GradeD").attr('checked',false); | |
$("#txtprice").removeAttr('readonly'); | |
$("#txtprice").val("300"); | |
$("#txtprice").attr('readonly',true); | |
}else{ | |
var price = parseInt($("#txtcount").val()); | |
var total = price * 300; | |
$("#txtprice").removeAttr('readonly'); | |
$("#txtprice").val(total); | |
$("#txtcount").attr('readonly',true); | |
$("#txtprice").attr('readonly',true); | |
} | |
}); | |
$("#GradeB").click(function(){ | |
$("#GradeA").attr('checked',false); | |
$("#GradeC").attr('checked',false); | |
$("#GradeD").attr('checked',false); | |
}); | |
$("#GradeC").click(function(){ | |
$("#GradeA").attr('checked',false); | |
$("#GradeB").attr('checked',false); | |
$("#GradeD").attr('checked',false); | |
}); | |
$("#GradeD").click(function(){ | |
$("#GradeA").attr('checked',false); | |
$("#GradeB").attr('checked',false); | |
$("#GradeC").attr('checked',false); | |
}); | |
$("#SizeS").click(function(){ | |
$("#SizeM").attr('checked',false); | |
$("#SizeL").attr('checked',false); | |
$("#SizeXL").attr('checked',false); | |
}); | |
$("#SizeM").click(function(){ | |
$("#SizeS").attr('checked',false); | |
$("#SizeL").attr('checked',false); | |
$("#SizeXL").attr('checked',false); | |
}); | |
$("#SizeL").click(function(){ | |
$("#SizeS").attr('checked',false); | |
$("#SizeM").attr('checked',false); | |
$("#SizeXL").attr('checked',false); | |
}); | |
$("#SizeXL").click(function(){ | |
$("#SizeS").attr('checked',false); | |
$("#SizeM").attr('checked',false); | |
$("#SizeL").attr('checked',false); | |
}); | |
//---------------------------------------------------------------------------- | |
$("#btnadd").click(function(){ | |
var read = $("#txtcount").val(); | |
read++; | |
$("#txtcount").removeAttr('readonly').val(read); | |
$("#txtcount").attr('readonly','true'); | |
// change money ------------------------------------ | |
if($("#GradeA").prop('checked') == true) | |
{ | |
$("#txtprice").removeAttr('readonly'); | |
//var price = parseInt($("#txtprice").val()); | |
var price = $.parseNumber($("#txtprice").val(), {format:"#,###.00", locale:"us"}); | |
var total = price + 300; | |
$("#txtprice").val(total); | |
$("#txtprice").attr('readonly',true); | |
} | |
//------------------------------------------------- | |
// | |
var price = $('#txtprice').val(); | |
var number = $.formatNumber(price, {format:"###,###.00", locale:"us"}); | |
$('#txtprice').val(number); | |
}); | |
$("#btnremove").click(function(){ | |
var read = $("#txtcount").val(); | |
if(read != 0) | |
{read--; | |
$("#txtcount").removeAttr('readonly').val(read); | |
$("#txtcount").attr('readonly','true'); | |
// change money ------------------------------------ | |
if($("#GradeA").prop('checked') == true) | |
{ | |
$("#txtprice").removeAttr('readonly'); | |
var price = parseInt($("#txtprice").val()); | |
var total = price - 300; | |
$("#txtprice").val(total); | |
$("#txtprice").attr('readonly',true); | |
} | |
//------------------------------------------------- | |
}// end if read | |
}); | |
}); | |
</script> | |
</head> | |
<body> | |
<div id="container"> | |
<nav id="cssmenu"> | |
<ul> | |
<li><a href='index.html'><span><font size="3">หน้าแรก</font></span></a></li> | |
<li class='active'><a href='product.html'><span><font size="3">สินค้า</font></span></a></li> | |
<li><a href='about.html'><span><font size="3">เกี่ยวกับเรา</font></span></a></li> | |
<li class='last'><a href='call.html'><span><font size="3">ติดต่อ</font></span></a></li> | |
<li></li> | |
<li></li> | |
<li></li> | |
</ul> | |
</nav> | |
<section> | |
<article> | |
<div id="menushirt"> | |
<font color="#FFFFCC"><b>Grade Price : A 300B/300P , B 200B/200P , C 150B/150P , D 100B/100P</b></font><p> | |
<input type="button" id="btnblack" class="btn" style="width: 25px; background-color: black;"> | |
<input type="button" id="btngray" class="btn" style="width: 25px; background-color: gray;"> | |
<input type="button" id="btnwhite" class="btn" style="width: 25px; background-color: white;"> | |
<input type="button" id="btnblue" class="btn" style="width: 25px; background-color: blue;"> | |
<input type="button" id="btnred" class="btn" style="width: 25px; background-color: red;"> | |
<input type="button" id="btnyellow" class="btn" style="width: 25px; background-color: yellow;"> | |
<input type="button" id="btnlime" class="btn" style="width: 25px; background-color: lime;"><p><br><p> | |
<span id="show"><img src="image/shirt/shirt black.png" style="width: 200px; height:200px;"></span><p> | |
<b><font color="black">Grade</font></b> | |
<font color="white"> | |
<input type="radio" id="GradeA" value="A">A | |
<input type="radio" id="GradeB" value="B">B | |
<input type="radio" id="GradeC" value="C">C | |
<input type="radio" id="GradeD" value="D">D | |
<br><p> | |
<b><font color="black">Size</font></b> | |
<input type="radio" id="SizeS" value="S">S | |
<input type="radio" id="SizeM" value="M">M | |
<input type="radio" id="SizeL" value="L">L | |
<input type="radio" id="SizeXL" value="XL">XL | |
</font> | |
<p> | |
<input type="button" id="btnremove" style="width:33;" value="<"> | |
<input type="text" id="txtcount" readonly="true" style="width:50px; text-align:center;" value="1"> | |
<input type="button" id="btnadd" style="width:30;" value=">"> | |
<input type="text" id="txtprice" readonly="true" style="width:80px; text-align:center;" value="0"><span id="dot">บาท</span> | |
<p> | |
<input type="button" value="สกรีนเสื้อ" style="width:115px; height:25px;"> | |
</div> | |
</article> | |
</section> | |
<aside> | |
<br> | |
 <img style="width:40px;" src="image/login.png"> | |
<center> | |
<input type="text" id="txtuser" class="textbox" maxlength="20" style="width:180px; font-size:15px;" placeholder=" ชื่อผู้ใช้งาน" ><p> | |
<input type="password" id="txtpass" class="textbox" maxlength="20" style="width:180px; font-size:15px;" placeholder=" รหัสผ่าน" > | |
<p><input type="button" class="btnfacebook" value="เข้าสู่ระบบ" style="font-size:14px;"/> | |
</center> | |
<br> | |
<center> | |
<a href="singup.html"><font color="#CCFFCC">สมัครสมาชิก</font></a> | |
<p><a href=""><font color="#FFA366">ลืมรหัสผ่าน</font></a> | |
</center> | |
</aside> | |
<footer> | |
</footer> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment