加密的URL应该使用javascript显示图像 [英] encrypted url should display image using javascript

查看:58
本文介绍了加密的URL应该使用javascript显示图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经加密了img标签的src路径。例如:加密形式的ftp地址/ ids / jer.jpg。我只使用javascript使用这个加密路径显示图片。请帮我做这个..我尝试使用背景图像解决方案并禁用右键单击选项。





< img src =id =i>

encrypt();

decrypt();

函数encrypt(){

//任何加密方法

img.src =加密路径;

}

函数decrypt(){

//任何解密方法

document.queryselector(div ).style.backgroundImage =解密路径;

}



这有效...但我需要用加密路径本身显示图像。除了这个之外还有什么解决方案吗?浏览器不会通过javascript中的加密路径显示图像,无论如何我们已经解密了路径,但是当给出查看源时如何隐藏图像的src路径..请帮助我..

解决方案

请参阅使用IHttpHandler的通用图像处理程序 [ ^ ]

I have encrypted the src path of an img tag..example: ftp address/ids/jer.jpg in encrypted form.how to display image using this encrypted path using javascript only.please help me to do this..I have tried with backgroud image solution&disable right click option.


<img src=""id="i">
encrypt();
decrypt();
function encrypt(){
//any encryption method
img.src=encrypted path;
}
function decrypt(){
//any decryption method
document.queryselector("div").style.backgroundImage=decrypted path;
}

This works...but i need to display image with that encrypted path itself.Is there any solution other than this??The browser will not show the image through the encrypted path in javascript,anyway we have decrypt the path but how to hide the src path of an image when view source is given..please help me..

解决方案

See Generic Image Handler Using IHttpHandler[^]


这篇关于加密的URL应该使用javascript显示图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆