html访问dll,.net c# 如何从同一dll中的html文件访问dll中的js文件

I have a .html file in a dll and need to refer a .js file in the javacript folder in the same dll.

I tried using this in the html file.

But getting script error.

How should I refer the js file in html?

Below I have attached the contents of dll

Talk1:

.html file in a dll?? Means??

Talk2:

I have embedded the html file in a dll

Talk3:

This needs a LOT more information on the overall use case.

Talk4:

I am creating an IE addon in c# project. I have a html file and some js and css files to be included in the html file. I have embedded all these files to a dll(Dynamic Link Library) so that I can deploy in target machine. Now I couldnot refer the js file in html file.

Solutions1

You can drop type="text/javascript" from the script file as for HTML5 javascript is the default script.Also make sure script tag is in head and src is pointing to correct path or use absolute path by copying from properties as shown in the below image.

0e04c4994ca8f66a3be2a8890b2daed3.png

Talk1:

How can I point source to the correct path when the js is inside a dll?

Talk2:

,Can you just show the js file snapshot or dll which contains js file

Talk3:

I have attached the snapshot of dll

Talk4:

Why cant you put js files in another folder called scripts and then refer it ?.Just my opinion

Talk5:

Still getting the same error. I guess its trying to refer from a wrong location. I error I get the URL as about:/scripts/pmp_my_popup.js

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值