18910140161

从输入获取值的处理按钮

顺晟科技

2021-07-17 11:06:17

239

我要做的是,创建一个按钮来改变特定文本的大小,新大小的值是一个输入类型,用户将用他的新大小填充输入,一旦他单击按钮,它将应用他刚刚输入的新大小(不要担心未定义的输入)

<!DOCTYPE html>
<html>
<body>

<h2 id="imp">First Text</h2>

<p id="demo">Second text.</p>


<button type="button" onclick="document.getElementById('demo')">Click Me to change the second text size to</button> 

<input type="input" value="Input your size"> PX



<br></br>


<button type="button" onclick = "document.getElementById('imp')"> Click me to change the first text size to  </button>

<input type="input" value="Input your size"> PX



</body>
<script>




</script>

</html> 

顺晟科技:

  • TAG:
相关文章
我们已经准备好了,你呢?
2024我们与您携手共赢,为您的企业形象保驾护航