|
|
|
อยากได้โค๊ตอย่างที่เว็บนี้ทำครับ ช่วยดูให้หน่อยครับ |
|
|
|
|
|
|
|
index.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>untitled</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<meta name="generator" content="Geany 0.18" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript">
$(function(){
$("#q").keyup(function(){
$.get("action.php", { key: $("#q").val() },
function(data){
$("#o").html("Data Loaded: " + data);
});
});
})
</script>
<style type="text/css">
body {
font-family: "Trebuchet MS", Tahoma, Verdana, Arial, Helvetica, sans-serif;
font-size: 15px;
color: #4f6b72;
background: #E6EAE9;
}
</style>
</head>
<body>
<p><input value="" name="q" id="q" autocomplete="off"></p>
<div id="o"></div>
</body>
</html>
action.php
<?php
$key = isset($_GET['key']) ? $_GET['key'] : '';
$array = array(0=>1, 1=>2, 2=>3, 3=>4, 4=>5, 5=>6, 6=>7, 11=>12);
echo $array[$key];
|
|
|
|
|
Date :
2010-10-08 15:48:58 |
By :
DS_Ohm |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ขอบคุณ ~OHM~ อย่างสูง
|
|
|
|
|
Date :
2010-10-08 17:37:45 |
By :
babyprogrammer |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 04
|