Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个控制 Arduino 的 LED 的 nodejs 服务器。它在http://localhost:3000/led?turn= {value} 中运行,我的值可以是“on”或“off”。如何从我的 React 应用程序中的切换按钮传递值?
只需解析来自的值window.location.search
window.location.search