HTML – Форма за въпроси и отговори
Здравеите,
Това е форма за отговор на зададен въпрос
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251"></head>
<body>
<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%"><div align="center">
<select name="selectbox" onChange="changecontent(this)">
<option>Въпрос 1</option>
<option>Въпрос 2</option>
<option>Въпрос 3</option>
<option>Въпрос 4</option>
</select>
<br>
</div></td>
</tr>
<tr>
<td width="100%"><textarea rows="8" name="contentbox" cols="80" wrap="virtual"></textarea></td>
</tr>
</table>
</form>
</td>
</tr>
</table>
<p>
<script language="JavaScript">
/*
Drop down messages script
By Website Abstraction (http://wsabstract.com)
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]='Отговор на въпрос 1'
thecontents[1]='Отговор на въпрос 2'
thecontents[2]='Отговор на въпрос 3'
thecontents[3]='Отговор на въпрос 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>
</body>
</html>


