All gists matching topic hyperlink

timmy / Streamlit 超連結

0 喜歡
0 分支
1 檔案
最後活躍 10 months ago
此範例展示如何在 Streamlit 應用中使用 st.markdown 搭配 unsafe_allow_html=True 來插入 HTML 連結,使使用者能夠點擊超連結並在新視窗開啟指定網站。
1 import streamlit as st
2
3 st.markdown(
4 '<a href="https://www.example.com" target="_blank">點擊這裡瀏覽範例網站</a>',
5 unsafe_allow_html=True
6 )
上一頁 下一頁