如何替换WebBrowser中的原始站点JS文件 [英] How replace the the original site JS file in WebBrowser

查看:285
本文介绍了如何替换WebBrowser中的原始站点JS文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在程序中使用WebBrowser来显示网站,但是我对该网站上的JavaScript文件功能不满意,我想调用自己的JS文件,但是我不知道如何使用我的JS文件js文件替换原始站点JS文件.
请帮助我!谢谢!
感谢Google翻译.

I used WebBrowser in a program to display a site , but I''m not satisfied with a JavaScript file functions on this website,I want to call my own JS file, but I don''t know how to use my js file to replace the the original site JS File.
Help Me Please!!Thanks!
感谢Google translate.

推荐答案

Javascript与HTML一起从服务器提供,因此您不能在网站上动态更改它.您可以使用HTMLReader来获取页面,将其存储在本地磁盘上,然后在显示本地版本之前对其进行修改以包含您自己的功能.
The Javascript is fed from the server along with the HTML so you cannot change it dynamically on the website. You could use an HTMLReader to obtain the page, store it on your local disk, and then modify it to contain your own functions before displaying the local version.


这篇关于如何替换WebBrowser中的原始站点JS文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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