* JavaScript usual funtion on NextUI Lab ## 1. window.location.href this JS change top browser https address ``` window.location.href = "www.google.com.tw" ``` icewindful useMemo ``` const DropGameList = React.useMemo(() => { return( <span className={homecss.DropdownGameBody}> <Dropdown> <DropdownTrigger> <Button className={itemBtncss.Button01} title="scroll" variant="solid" > 遊戲攻略 </Button> </DropdownTrigger> <DropdownMenu aria-label="Dynamic Actions" items={GameList} className={homecss.scrollMenu} classNames={{list:"max-h-[70vh] overflow-scroll no-scrollbar"} } > {(item) => ( <DropdownItem key={item.key} onClick={() => {window.location.href = item.link}} //window.location.href is chnage now windows https > <Link href={item.link}>{item.label}</Link> </DropdownItem> )} </DropdownMenu> </Dropdown> </span> ) },[]); ```
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up