|
|
|
ผมต้องการให้กด Focus Enter TexField1 ไปยัง TexField2 --> TexField3 --> TexField4 ต้อง code อะไรคับ |
|
|
|
|
|
|
|
ผมต้องการให้กด Enter TexField1 ไปยัง TexField2 --> TexField3 --> TexField4 ต้องใช่ code อะไรคับ
ช่วยดูให้ด้วยครับพี่น้องครับ
Code (VB.NET)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>IT Goko Sring Service</title>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
<style type="text/css">
<!--
.style2 {font-size: 16px}
.style4 {
font-family: Geneva, Arial, Helvetica, sans-serif;
color: #0000FF;
}
.style6 {color: #FF0000}
.style10 {color: #333333}
-->
</style>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function scroll(jumpSpaces,position) {
var msg = "IT Goko Sring Service Tel 113"
var out = ""
if (killScroll) {return false}
for (var i=0; i<position; i++){
out += msg.charAt(i)}
for (i=1;i<jumpSpaces;i++) {
out += " "}
out += msg.charAt(position)
window.status = out
if (jumpSpaces <= 1) {
position++
if (msg.charAt(position) == ' ') {
position++ }
jumpSpaces = 100-position
}
else if (jumpSpaces > 3) {
jumpSpaces *= .75}
else {
jumpSpaces--}
if (position != msg.length) {
var cmd = "scroll(" + jumpSpaces + "," + position + ")";
scrollID = window.setTimeout(cmd,5);
}
else {
scrolling = false
return false}
return true;
}
function startScroller() {
if (scrolling)
if (!confirm('Re-initialize snapIn?'))
return false
killScroll = true
scrolling = true
var killID = window.setTimeout('killScroll=false',6)
scrollID = window.setTimeout('scroll(100,0)',10)
return true
}
var scrollID = Object
var scrolling = false
var killScroll = false
// End -->
</SCRIPT>
</head>
<body>
<BODY onLoad="startScroller()">
<div>
<table width="1191" height="279" border="0">
<tr>
<td height="46" colspan="2" background="Images/sg_13_32.jpg"><div align="center"><img src="Images/Computer Services Online .jpg" width="400" height="50" /><img src="Images/sg_13_33.jpg" width="297" height="49" /></div></td>
<td colspan="5" background="Images/sg_13_32.jpg"> </td>
</tr>
<tr>
<td rowspan="2" background="Images/sg_13_64.jpg"> </td>
<td height="46"><h1 align="center"><img src="Images/Online.jpg" alt="" width="400" height="50"></h1>
<p align="center" class="style4"><a href="index.php">หน้าแรก</a></p>
<form name="form1" method="post" action="add.php">
<p align="center">
<script language="javascript">
<!--
document.write("<P ALIGN=center><l>"+ Date()+"<\/l><\/P>")
//-->
</script>
</p>
<p align="center"> <span class="style6">ผู้แจ้งซ่อม</span>
<input name="name" type="text" size="50" id="name">
</p>
<p align="center"> <span class="style6">หน่วยงาน</span>
<input name="section" type="text" size="50" id="section">
</p>
<p align="center"><span class="style2"><font face="MS Sans Serif, Tahoma, sans-serif"><span class="style6">วันท</span></font><span class="style6"><font face="MS Sans Serif, Tahoma, sans-serif">ี่ </font></span><font color="#000000" face="MS Sans Serif, Tahoma, sans-serif">
<select name="date" size="1" id="date" action="">
<option value="0">ระบุวันที่</option>
<option value="1" selected>1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
</select>
</font><font face="MS Sans Serif, Tahoma, sans-serif"><span class="style6">เดือน</span></font><font color="#000000" face="MS Sans Serif, Tahoma, sans-serif"><font color="#000000" face="MS Sans Serif, Tahoma, sans-serif">
<select name="date2" id="date2" action="">
<option value="0">ระบุเดือน</option>
<option value="Jan" selected>Jan</option>
<option value="Feb">Feb</option>
<option value="Mar">Mar</option>
<option value="Apr">Apr</option>
<option value="May">May</option>
<option value="June">June</option>
<option value="July">July</option>
<option value="Aug">Aug</option>
<option value="Sep">Sep</option>
<option value="Oct">Oct</option>
<option value="Nov">Nov</option>
<option value="Dec">Dec</option>
</select>
</font> </font><font face="MS Sans Serif, Tahoma, sans-serif"><span class="style6">ปีพ.ศ</span></font><font color="#000000" face="MS Sans Serif, Tahoma, sans-serif">.
<select name="date3" id="date3" action="">
<option value="0">ระบุปี</option>
<option value="2010" selected>2010</option>
<option value="2011">2011</option>
</select>
</font></span></p>
<p align="center">
<label><span class="style6">Time</span>
<select name="time" id="time">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8" selected>8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
</select>
</label>
<label><span class="style6">Minutes</span>
<select name="time2" id="time2" action="">
<option>00</option>
<option>01</option>
<option>02</option>
<option>03</option>
<option>04</option>
<option>05</option>
<option>06</option>
<option>07</option>
<option>08</option>
<option>09</option>
<option>10</option>
<option>11</option>
<option>12</option>
<option>13</option>
<option>14</option>
<option>15</option>
<option>16</option>
<option>17</option>
<option>18</option>
<option>19</option>
<option>20</option>
<option>21</option>
<option>22</option>
<option>23</option>
<option>24</option>
<option>25</option>
<option>26</option>
<option>27</option>
<option>28</option>
<option>29</option>
<option>30</option>
<option>31</option>
<option>32</option>
<option>33</option>
<option>34</option>
<option>35</option>
<option>36</option>
<option>37</option>
<option>38</option>
<option>39</option>
<option>40</option>
<option>41</option>
<option>42</option>
<option>43</option>
<option>44</option>
<option>45</option>
<option>46</option>
<option>47</option>
<option>48</option>
<option>49</option>
<option>50</option>
<option>51</option>
<option>52</option>
<option>53</option>
<option>54</option>
<option>55</option>
<option>56</option>
<option>57</option>
<option>58</option>
<option>59</option>
</select>
<br>
<br>
</label>
<strong>
<select name="status" >
</select>
</strong></p>
<p align="center">
<label></label>
<p align="center">
<textarea name="details" cols="100" rows="5"></textarea>
</p>
<p align="center"> </p>
<p align="center">
<input type="submit" name="sen" value="ส่งข้อมูล">
<input type="reset" name="cancel" value="ยกเลิก">
</p>
<p></p>
</form></td>
<td colspan="5" rowspan="2" background="Images/sg_13_64.jpg"> </td>
</tr>
<tr>
<td height="46"> </td>
</tr>
<tr>
<td width="47" background="Images/sg_13_64.jpg"> </td>
<td width="1084" height="46" background="Images/sg_13_64.jpg" bgcolor="#0000FF"><div align="center"><strong>Goko Sprinp (Thailiand) Co., Ltd.</strong></div></td>
<td width="46" colspan="5" background="Images/sg_13_64.jpg"> </td>
</tr>
</table>
<div align="center"></div>
<p align="center"> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p align="center"> </p>
</div>
<p> </p>
<p align="center"> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p align="center"> </p>
<p> </p>
<p> </p>
<p> </p>
</body>
</html>
Tag : - - - -
|
|
|
|
|
|
Date :
2010-02-01 09:24:36 |
By :
care123 |
View :
806 |
Reply :
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Code (JavaScript)
<html>
<head>
<title>ThaiCreate.Com Tutorial</title>
</head>
<body>
<form name="frmMain" action="" method="post">
<script language="JavaScript">
document.onkeydown = chkEvent
function chkEvent(e) {
var keycode;
if (window.event) keycode = window.event.keyCode; //*** for IE ***//
else if (e) keycode = e.which; //*** for Firefox ***//
if(keycode==13)
{
return false;
}
}
function setNextFocus(objId){
if (event.keyCode == 13){
var obj=document.getElementById(objId);
if (obj){
obj.focus();
}
}
}
</script>
Textbox 1 <input type="text" name="txt1" value="" onKeyDown="setNextFocus('txt2');"> <br>
Textbox 2 <input type="text" name="txt2" value="" onKeyDown="setNextFocus('txt3');"> <br>
Textbox 3 <input type="text" name="txt3" value=""><br>
<input type="submit" name="btnSubmit" value="Submit">
</form>
</body>
</html>
Go to : Javascript Enter and AutoFocus Next Textbox (Up and Down Keyword)
|
|
|
|
|
Date :
2012-07-15 15:34:26 |
By :
q |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 02
|