C#中的Web浏览器中的javascript [英] javascript in web browser in C#

查看:72
本文介绍了C#中的Web浏览器中的javascript的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在制作一个软件windows导航应用程序

公司在JSP中有一个网站,有很多控件,如单选按钮,文本框,复选框,javascript函数和外部java脚本,



该网站我尝试从Windows应用程序访问

问题1;

1)我想要包括所有外部javascript windows应用程序中的文件

---如果不可能那么告诉我

如何制作功能对象(wb.Document.Invokescript(javascript function)) ;)

如何在网页窗体应用程序中访问javascript中保存值的所有变量

如果我从网页上的javascript调用Date函数但我只需要时间在窗口应用程序如何我可以做什么

1)在Windows应用程序中成功调用日期函数,在messagebox.show中显示所有内容(我存储日期值的变量)但是使用我想要的调用我存储在var中的gettime功能iable并传入字符串



问题2;

在该网站(jsp)中有表格持有值和无线电控制与onclick事件有功能



1)我想访问网页窗口应用程序中的特定单选按钮









请帮助我解决这个问题

2)

I am making a software windows navigation application
company have a website in JSP that have so many control like radio button, textbox, check box, javascript function and external java script,

that website I try to access from windows application
problem 1;
1)i want to include all all external javascript document in windows application
--- if it is not possible then tell me
how to make object of the fuction ( wb.Document.Invokescript("javascript function"); )
how to access all variable that hold a value in javascript on web page form windows application
if i invoke Date function from javascript on web page but i need only time in window application HOW can i do
1) date function is called successfully in windows application that show all in messagebox.show("that variable in which i store value of date")but using that i want to call gettime fuction which i store in variable and pass in string

problem 2;
in that website (jsp)there is table holding values and radio control with onclick event having function

1) i want to access specific radio button in web page form windows application




PLEASE HELP ME TO SLOVE THIS PROBLEM
2)

推荐答案

Monika,



这是我对旧相关问题的回答 http://www.codeproject.com/Questions/400851/javascript-in-web-browser-in-Csharp



这个问题毫无意义。没有像调用脚本这样的概念。一个脚本本质上是一组创建一些对象的指令。其中一些对象是函数,因此您只能调用函数。但是全部调用它们的想法也没有意义,因为每个函数都可以用不同的参数调用,它们可以按不同的顺序调用,依此类推。这不是什么确定的事情,几乎可以是任何事情。
这就是你遇到的问题:你问了很多问题,因为滥用报告经常会被自动删除,所以没有任何意义可以解决问题。 。但在那种情况下,我已经发布了一个问题的答案,但我认为你真的需要一些帮助来解决你的误解。



你对你有类似的误解目前的问题。没有所有外部JavaScript文档这样的东西。 JavaScript被用于比如说,包含在HTML中,或被引用,或被其他一些脚本系统(如WSH)调用。 如何创建函数的对象这个问题也没有意义,因为JavaScript函数已经是一个对象,可以用作任何其他对象。您不能访问所有变量:它们不会在任何地方完全引用,只是因为这不是必需的,而不是变量的使用方式。它们只是被它们的名字使用,如果它没有发生,开发人员不会简单地声明一个变量。



我明白你需要开发一个Web .NET应用程序中的浏览器,具有一些特定的功能,但我不明白为什么你真的需要它,你真的明白你想要实现的目标。我认为你不理解它,原因就像我上面解释的那样,抱歉。



-SA
Monika,

This is my answer to you old related question http://www.codeproject.com/Questions/400851/javascript-in-web-browser-in-Csharp:

The question makes no sense all. There is no such concept as "call as script". A script is, essentially, a set of instructions creating some object. Some of those objects are functions, so you can only call functions. But the idea of "calling them all" would also make no sense, because each function can be called with different parameters, they can be called in different order, and so on. This is not anything certain, can be nearly anything.
Here is the problem you have: you ask so many questions which makes no sense that they are often get automatically removed due to abuse reports, sooner than one can possible answer them. But in that case I already posted an answer which has gone with your question, but I think you really need some help with your misconception.

You have similar misconception with your present question. There is no such thing as "all external JavaScript document". JavaScript is used where it is used, say, included in HTML, or referenced, or called by some other scripting system, such as WSH. The question "how to make object of the function" also makes no sense, because a JavaScript function is already an object and can be used as any other object. You cannot "access all variables": they are not referenced altogether anywhere, just because this is not needed and is not how variables are used. They are just used by their names, if it does not happen, the developer won't simply declare a variable.

I do understand that you need to develop a Web browser in a .NET application, with some specific features, but I cannot see why would you really need it and that you really understand what you want to achieve. I think you don't understand it, by the reasons like those I explained above, sorry.

—SA


这篇关于C#中的Web浏览器中的javascript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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