Home > Backend Development > PHP Tutorial > 请问一个有关问题:js接收text内容并在制定位置显示内容

请问一个有关问题:js接收text内容并在制定位置显示内容

WBOY
Release: 2016-06-13 10:04:02
Original
759 people have browsed it

请教一个问题:js接收text内容并在制定位置显示内容;
js接收text内容并在制定位置显示内容;

------解决方案--------------------
document.getElementById("#ss").innerHTML='内容';
这样行吗?
------解决方案--------------------

HTML code
<input type="text" id="aa"> <input type="button" value="提交" onclick="check()"><div id="view"></div> <script> funtion check(){ //点击后显示的是text输入的内容并将这个内容显示到按钮的后面document.getElementById("view").innerTEXT=document.getElementById("aa").value;} </script><br><font color="#e78608">------解决方案--------------------</font><br>
Copy after login

 


<script> <br />funtion check(){ <br />document.getElementById("#test").innerHTML=document.myform.aa.value; <br />} <br /></script>
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template