GORAGOD.com

freelance, web developer, web designer, hosting, domain name

อยากทราบว่าถ้าเราจะเช็คค่าว่าในแบบฟอร์มว่าตรงไหนว่างให้ set focu

 แบบว่าต้องการให้มันเช็คค่้าว่างแล้ว set focus ตรงช่องที่ว่าง พร้อมทั้งเน้นสีในช่อง text box ด้วยอะคับทำงัยคับ
13 Dec 2009 1 1,928

คร่าวๆดังนี้ครับ แบบไม่มีสีนะครับ


if(empty($_POST['password'])){
$focus="document.a.password.focus();";
}




ตรงformก็ใส่
<Body  onload=<?=$focus?>>

ครับ
#1
Comment
Upload jpg, jpeg files no larger than 2M
^