Home  >  Article  >  Web Front-end  >  Add the value in text to the js code of textarea_form effects

Add the value in text to the js code of textarea_form effects

WBOY
WBOYOriginal
2016-05-16 18:26:081084browse

The effect is as shown in the picture:
Add the value in text to the js code of textarea_form effects


[Ctrl A Select all Note: If you need to introduce external Js, you need to refresh it to execute
]
<script> function Addother() { if(document.form1.ourl.value==""||document.form1.ourl.value=="http://"){ alert('网址不能为空!'); return ;} if(document.form1.oname.value==""){ alert('名称不能为空!'); return ;} document.form1.xiangguanid2.value += document.form1.ourl.value+" | "+document.form1.oname.value+"\r\n"; } </script> Regarding the background processing code, You can refer to the relevant articles below.
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn