tool tip in text box
เห็น input text box ข้างล่างรึเปล่าคับ ลองคลิกเข้าไป เพื่อจะพิมพ์ข้อความดูสิคับ พอเราคลิกใน input box แล้วข้อความที่อยุ่ข้างในนั้นก็จะหายไป แล้วเราคลิกเมาส์ออกมา ตัวข้อความก็จะกลับมาเหมือนเดิม จนกว่าเราจะพิมพ์ข้อความของเราเข้าไป มันถึงจะไม่แสดงข้อความของมัน
ด้วยหลักการ event ของ input box ง่ายๆ คับ
ที่เราต้องใช้ก็จะมี
event onFocus, onBlur 2 ตัวนี้เท่านั้นเองคับ
Input Your Name
<input name="search" type="text" value="Your name is here." maxlength="150" onfocus="this.value=(this.value=='Your name is here.') ? '' : this.value;" onblur="this.value=(this.value=='') ? 'Your name is here.' : this.value;" />

เว็บฝากไพล์ http://www.upload.tc