|
 |
|
ใครมีโค๊ดมาตรวัดผล หรือเกจวัด ที่เป็นเหมือนมิเตอร์บ้างอ่ะครับ |
|
 |
|
|
 |
 |
|
ประมาณนี้ป่าวคะ
XML/SWF Gauge
|
 |
 |
 |
 |
Date :
2010-03-31 17:29:31 |
By :
ultrasiam |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ขอบคุณมากๆ เลยครับ อันแรกผมโหลดมาลองดูแล้วครับ แต่มันเหมือนกับเป็นตัวอย่างหรือผมใช้ไม่เป็นก็ไม่รู้ครับ เดี๋ยวต้องลองมั่วดูต่อไปครับ 
|
 |
 |
 |
 |
Date :
2010-04-01 07:23:52 |
By :
supitch21 |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
อันแรกเคยเอามาลองใช้แล้วครับ ใช้ได้ ไม่ใช่แค่ตัวอย่าง แต่เซ็งตรงที่เข็มมันชักกระตุกอยู่ตลอดเวลา เราต้องการให้เข็มมันวิ่งไปค่าใดค่านึงแล้วก็หยุดตรงนั้น แต่มันกระตุก ๆ อยู่ตลอด ไม่รู้จะแก้ยังไงเลยเลิกใช้ซะ
|
 |
 |
 |
 |
Date :
2010-04-08 00:55:16 |
By :
dekcom |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
แล้ว เอาไปใช้งานอย่างไรพอจะมีโค้ด ให้ดูบ้างมัยครับ
|
 |
 |
 |
 |
Date :
2014-09-11 10:26:24 |
By :
nankittiphat |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
meter.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>
<title>HTML5</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<script type="text/javascript">
function callAjax(str, target) {
if (str == "") {
document.getElementById(target).value = "0";
document.getElementById('result').innerHTML = "0";
return;
}
if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp = new XMLHttpRequest();
}
else { // code for IE6, IE5
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
document.getElementById(target).value = xmlhttp.responseText;
document.getElementById('result').innerHTML = xmlhttp.responseText;
}
}
xmlhttp.open("GET", str, true);
xmlhttp.send();
}
function increaseValue() {
var val = document.getElementById("meter1").value;
callAjax("meter.ajax.php?action=increase&val=" + val, "meter1");
}
function decreaseValue() {
var val = document.getElementById("meter1").value;
callAjax("meter.ajax.php?action=decrease&val=" + val, "meter1");
}
</script>
</head>
<body>
<form id="form1" name="form1" method="post">
<div>
<meter id="meter1" max="100" style="width:200px;"></meter>
<input type="button" name="Button1" value="<<" id="Button1" onclick="decreaseValue();" />
<input type="button" name="Button2" value=">>" id="Button2" onclick="increaseValue();" />
<br />
Value: <span id="result">0</span>
</div>
</form>
</body>
</html>
meter.ajax.php
<?php
if (!empty($_GET)) {
$action = $_GET["action"];
$val = $_GET["val"];
switch ($action) {
case 'increase':
echo ($val < 100) ? $val + 5 : 100;
break;
case 'decrease':
echo ($val > 0) ? $val - 5 : 0;
break;
}
}
?>
|
 |
 |
 |
 |
Date :
2014-09-11 10:35:28 |
By :
ห้ามตอบเกินวันละ 2 กระทู้ |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|

พอดีอยากได้ เหมือนในรูปนี้อะครับ
ประมาณว่า ดึงข้อมูลมากจาก Mysql แล้วแสดง ออกมาแบบนี้อะครับ
พอจะมีใครทำได้มัยครับ มือใหม่จริงๆๆ ขอบคุณล้วงหน้าครับ
|
 |
 |
 |
 |
Date :
2014-09-11 11:11:23 |
By :
nankittiphat |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 05
|