Code tạo bảng hỏi đáp
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%"><form name="ddmessage"><table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%"><select name="selectbox" size="1" onChange="changecontent(this)">
<option selected value="Nội dung câu hỏi 1?">Nội dung câu hỏi 1?</option>
<option value="Nội dung câu hỏi 2?">Nội dung câu hỏi 2?</option>
<option value="Nội dung câu hỏi 3?">Nội dung câu hỏi 3?</option>
<option value="Nội dung câu hỏi 4?">Nội dung câu hỏi 4?</option>
</select><br>
</td>
</tr>
<tr>
<td width="100%"><textarea rows="8" name="contentbox" cols="35" wrap="virtual"></textarea><br>
<font face="arial" size="-2">Kịch bản này miễn phí được cung cấp bởi <a href="http://Violet.vn/dangquocthu">Đặng Quốc Thư</a></font>
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
<p>
<script language="JavaScript">
/*
Drop down messages script
By JavaScript Kit (<a href="http://Violet.vn/dangquocthu">http://Violet.vn/dangquocthu</a>)
Over 400+ free scripts here!
*/
//change contents of message box, where the first one corresponds with the first drop down box, second with second box etc
var thecontents=new Array()
thecontents[0]='Câu trả lời cho câu hỏi 1.'
thecontents[1]='Câu trả lời cho câu hỏi 2.'
thecontents[2]='Câu trả lời cho câu hỏi 3.'
thecontents[3]='Câu trả lời cho câu hỏi 4.'
//don't edit pass this line
function changecontent(which){
document.ddmessage.contentbox.value=thecontents[which.selectedIndex]
}
document.ddmessage.contentbox.value=thecontents[document.ddmessage.selectbox.selectedIndex]
</script>
Phạm Chí Ngoan @ 03:02 12/05/2012
Số lượt xem: 281
- Code tạo nút thông báo giờ trên web (12/05/12)
- code tạo lọ hoa động rất đẹp (12/05/12)
- Code để tạo tiêu đề blog violet thay đổi theo thời gian (12/05/12)
- Code tạo menu bằng hình ảnh (12/05/12)
- Đưa flash vào mục ý kiến (12/05/12)
Các ý kiến mới nhất