suchen

Heim  >  Fragen und Antworten  >  Hauptteil

python - 页面链接跳转问题

本地运行的网站,怎么通过自己的页面跳转到别的网站的页面上去,比如要从自己的某个页面跳转到百度的首页,我在HTML里用a标签,但是出错了,发现网址居然是这样的:127.0.0.1:5000/www.baidu.com。到底要怎么才能跳转到百度的首页去呢??求教。

高洛峰高洛峰2887 Tage vor399

Antworte allen(5)Ich werde antworten

  • 迷茫

    迷茫2017-04-17 17:38:52

    <a href="http://www.baidu.com">baidu</a>

    baidu

    Antwort
    0
  • 黄舟

    黄舟2017-04-17 17:38:52

    用script的window.location.href试试

    window.location.href="baidu.com"

    Antwort
    0
  • 怪我咯

    怪我咯2017-04-17 17:38:52

    我试了下用href是可以的:

    <h1>Hello Word</h1>
    <p><a href="https://www.baidu.com">Switch to baidu</a></p>

    Antwort
    0
  • PHPz

    PHPz2017-04-17 17:38:52

    baidu

    Antwort
    0
  • 怪我咯

    怪我咯2017-04-17 17:38:52

    sjd_dream的方法是可以的,注意是https,http是不行的

    Antwort
    0
  • StornierenAntwort