import streamlit as st | |
import webbrowser | |
# 定义跳转到 Google 的函数 | |
def redirect_to_google(): | |
url = 'https://www.google.com' | |
webbrowser.open_new_tab(url) | |
# # 在应用程序中调用跳转函数 | |
# redirect_to_google() | |
if st.button('go'): | |
print('go') | |
redirect_to_google() |
import streamlit as st | |
import webbrowser | |
# 定义跳转到 Google 的函数 | |
def redirect_to_google(): | |
url = 'https://www.google.com' | |
webbrowser.open_new_tab(url) | |
# # 在应用程序中调用跳转函数 | |
# redirect_to_google() | |
if st.button('go'): | |
print('go') | |
redirect_to_google() |