请教各位这个实现的方法? 是不是用JS可以呢?
[此贴子已经被作者于2007-9-2 16:59:45编辑过]
[此贴子已经被作者于2007-9-2 16:59:45编辑过]
<form name="Dvform">
<select name="font" onchange="DoTitle(this.options[this.selectedIndex].value)">
<option selected="selected" value="">选择话题</option>
<option value=[原创]>[原创]</option>
<option value=[求助]>[求助]</option>
<option value=[开源]>[开源]</option>
<option value=[讨论]>[讨论]</option>
<option value=[转载]>[转载]</option>
<option value=[经验]>[经验]</option>
<option value=[分享]>[分享]</option>
<option value=[休闲]>[休闲]</option>
</select>
<input name="topic" id="topic" size="85" class="FormClass" value="">
<font color="#FF0000"><b>*</b></font>
<script language="javascript">
if (document.Dvform.topicximoo){
document.Dvform.topicximoo.options[0].selected=true;
}
function DoTitle(addTitle) {
if (addTitle=="[原创]")
{
alert("暂时还没此功能");
}else
{
var revisedTitle;
var currentTitle = document.getElementById("topic").value;
revisedTitle = addTitle+currentTitle;
document.getElementById("topic").value=revisedTitle;
document.getElementById("topic").focus();
return;
}
}
</script>
</form>