Redirect to a different site with a button click #352
Answered
by
18870
rabbipigeon
asked this question in
Q&A
-
Questions: Redirecting with buttonsIm trying to have a button thats gonna be used for redirecting user to a different site such as below but i havent been able to get it to trigger on click desired functionality put_buttons(["Tweet","Youtube"],onclick=[open twitter, open youtube]) |
Beta Was this translation helpful? Give feedback.
Answered by
18870
Apr 8, 2022
Replies: 2 comments 2 replies
-
put_button("github", onclick=lambda: run_js("location.href='https://github.com/'"))
put_button("github", onclick=lambda: run_js("window.open('https://github.com/')")) |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
helincao
-
貌似这个办法只适用于打开站外的链接?如果url是站内的相对链接,好像不可用。在log里看到是执行了一个post的操作。
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
#270