求教大佬,怎么写一个简易的html程序啊?
要一个带有按键的,按下固定的按键就显示什么东西,最好能再加一个搜索模块,劳烦大佬了!
<html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>search</title> <script> function search() { var searchContent = document.getElementById("search_content").value; alert(searchContent); } </script> </head> <body> <input id="search_content" type="text" placeholder="输入你要搜索的内容" /><button onclick="search()">搜索</button> </body> </html>