<script type="text/javascript">
function getFieldSelection(id)
{
var word = document.getElementById(id).value;
return word;
}
</script>
<textarea id="txtarea" rows="3" cols="20"></textarea>
<br />
<br />
<button οnclick="alert(getFieldSelection('txtarea'))">button_click</button>
js获取textarea内容
最新推荐文章于 2024-09-24 16:15:36 发布