import React, { useState } from 'react';
function App() {
// 使用 state 来管理输入框的值
const [inputValue, setInputValue] = useState('');
// 处理输入框变化的事件
const handleChange = (event) => {
setInputValue(event.target.value); // 更新 state
};
return (
<div>
<input
type="text"
value={inputValue} // 绑定到 state
onChange={handleChange} // 每次输入时更新 state
/>
<p>输入的值: {inputValue}</p>
</div>
);
}
export default App;
<html>
<header
style="
position: fixed;
left: 0px;
right: 6px;
top: 0px;
z-index: 10;
display: flex;
height: 5.6rem;
width: 100%;
align-items: center;
justify-content: space-between;
background-color: rgb(0, 0, 0);
padding-left: 12vw;
padding-right: 12vw;
color: rgb(229, 44, 62);
font-size: 1rem;
margin: 0px;
text-align: start;
line-height: 30px;
font-weight: 300;
font-family: FZFangJHJW, sans-serif;
"
>
<a href="/">
<img
src="/_nuxt/logo.DCwKeGp9.svg"
style="
display: block;
vertical-align: middle;
max-width: 100%;
height: 2.7rem;
min-height: 2.7rem;
"
/>
</a>
<div
style="
display: flex;
height: 4rem;
width: 40%;
align-items: center;
justify-content: space-between;
font-size: 1rem;
line-height: 4rem;
color: rgb(255, 255, 255);
"
>
<a
href="https://www.adspolar.com/cn/"
style="margin-left: 0.5rem; margin-right: 0.5rem; cursor: pointer; word-break: keep-all"
>核心功能</a>
<div
style="margin-left: 0.5rem; margin-right: 0.5rem; cursor: pointer; word-break: keep-all"
>博客中心<div
style="
position: relative;
bottom: 3px;
border-radius: 3px;
border-bottom: 6px solid rgb(229, 44, 62);
border-top-style: solid;
border-right-style: solid;
border-left-style: solid;
border-top-color: rgb(229, 44, 62);
border-right-color: rgb(229, 44, 62);
border-left-color: rgb(229, 44, 62);
"
></div>
</div>
<a
href="https://www.adspolar.com/cn/partner"
style="margin-left: 0.5rem; margin-right: 0.5rem; cursor: pointer; word-break: keep-all"
>合作伙伴</a>
<a
href="https://help.adspolar.com/"
style="margin-left: 0.5rem; margin-right: 0.5rem; cursor: pointer; word-break: keep-all"
>帮助中心</a>
</div>
<div>
<a
target="_blank"
href="//www.adspolar.com/m/sign-up?mode=2&landing_site=official_cn&lang=zh-CN"
style="
background-color: rgb(229, 44, 62);
border-radius: 6px;
color: rgb(255, 255, 255);
font-size: 1rem;
letter-spacing: 2px;
padding: 0.7rem 1.2rem;
"
>免费试用</a>
<a
target="_blank"
href="//www.adspolar.com/m/login?mode=2&landing_site=official_cn&lang=zh-CN"
style="margin-left: 3rem; font-size: 1rem; color: rgb(255, 255, 255);"
>登录</a>
</div>
</header>
</html>