【问题标题】:Unable to get the img src from the external link无法从外部链接获取 img src
【发布时间】:2015-07-22 15:51:47
【问题描述】:

我有一个 Html 页面,其中有一个图像标签,我想显示一个已部署在外部 webApplication 中的图像。当我在浏览器中浏览该链接时它正在工作,但是当我将该链接添加到 img src 它不工作

<img id="empPic" alt="" src="http://xyz/emp/displayImage.jsp?empId=7" width="90px" height="100px" style="border-radius: 12px;">

【问题讨论】:

  • 请提供外部网络申请链接
  • 您一定使用了某种身份验证机制来防止未经授权的访问。

标签: javascript jquery html


【解决方案1】:
src="http://xyz/emp/displayImage.jsp?empId=7"

Serversscript 必须为您提供图像数据,而不是对图像的引用。

如果jsp只给你一个参考,你必须先接收参考,并在src-attribute中设置它

【讨论】:

    猜你喜欢
    • 2020-06-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-07-25
    • 1970-01-01
    • 2013-04-17
    • 2015-03-13
    相关资源
    最近更新 更多