textarea 添加一键回复 快捷发内容的方法 js超简洁

2024-02-15 18:17:34 举报文章
<textarea id="reason" name="reason" cols="50" rows="5">$reason</textarea>
<select onchange="quotecomment(this.options[this.selectedIndex].value)">
<option selected="selected">下拉菜单选择快捷回复语句</option>
<option value="QZPHP太棒了,网址是:http://www.qzphp.cn">QZPHP太棒了,网址是:http://www.qzphp.cn</option>
</select>
<script>
function quotecomment(oo){
	document.getElementById("reason").value=oo;
	document.getElementById("reason").focus();
}
</script>
如果你认为本文可读性较差,内容错误,或者文章排版错乱,请点击举报文章按钮,我们会立即处理!