C#作为脚本语言:从Javascript到C#的转换 [英] C# as a scripting language: Conversion from Javascript to C#

查看:108
本文介绍了C#作为脚本语言:从Javascript到C#的转换的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

 

我有三个页面,分别是index.html,menu.html和content.html.您可能会猜到,索引包含一个框架集,在其中我称呼其他两个页面.问题是我想将内容框架中标签的值更改为文本框的值 当我单击菜单框架上的按钮时,在菜单框架或menu.html中.

I have three pages, namely index.html, menu.html and content.html. As you may guess, index includes a frameset in which I call the other two pages. The thing is that I want to change the value of the label in the content frame to the value of the textbox in the menu frame, or menu.html, when I click the button on the menu frame. 

 

我有这样的事

  1. function fun()
  2. parent.frames[1].document.getElementById("msg").innerText = frm.usid.value;
  3. }


推荐答案

您只能使用浏览器中可用的sript语言.普通的网络浏览器都支持JavaScript,但是目前我还不知道任何支持C#的浏览器.

You can only use the sript language that is available in the browsers. The common web browser all support JavaScript, but at the moment I don't know of any browser, that supports C#.

也许您想看看 http://asp.net 来阅读有关使用ASP.Net进行Web开发的信息.可以使用C#,但其中仅包含在服务器端运行的代码(在这里,您不会引用类似 在您的JavaScript代码中使用,但如果我没记错的话,该网站还为初学者提供了一些非常不错的介绍.我只是建议去那里阅读一些有关可用内容的信息.)

Maybe you want to have a look at http://asp.net to read about the web development with ASP.Net. C# can be used, but that contains only code that is running on the server side (And in there you do not reference stuff like it is in your JavaScript code, but the site has also some very nice introductions for beginners if I remember correctly. I would simply suggest to go there and read a little bit about the available stuff.)

以诚挚的问候,

Konrad


这篇关于C#作为脚本语言:从Javascript到C#的转换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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