|
|
|
ไม่ทราบว่าเราจะเลือกข้อมูลที่มี class name : Selected อย่างไร ต้องการ id จากข้อมูลที่เลือกค่ะ |
|
|
|
|
|
|
|
คำถามยังใม่ Clear ครับ
|
|
|
|
|
Date :
2011-07-16 20:37:30 |
By :
webmaster |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Code (PHP)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type="text/javascript">
function mark(obj) {
if(obj.className=="None"){
obj.className = "Selected";
}else{
obj.className = "None";
}
}
</script>
<style>
.Selected{
background: url("../images/Check.png") no-repeat;
height: 28px;
width: 150px;
display: block;
}
.None{
height: 28px;
width: 150px;
display: block;
}
</style>
</head>
<body>
<li id="uid1" onclick="mark(this);" class="None" >uid1</li>
<li id="uid2" onclick="mark(this);" class="None" >uid2</li>
<li id="uid3" onclick="mark(this);" class="None" >uid3</li>
<li id="uid4" onclick="mark(this);" class="None" >uid4</li>
<li id="uid5" onclick="mark(this);" class="None" >uid5</li>
<li id="uid6" onclick="mark(this);" class="None" >uid6</li>
<div style="height:32px; width:70px;" >li selected</div>
</body>
</html>
|
|
|
|
|
Date :
2011-07-16 20:51:05 |
By :
PlaKriM |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 02
|