如何在ASP中使用JScript触发对象事件 [英] how to use jscript in asp for firing object events
问题描述
你好,我正在asp中使用vbscript,所有事件都在响应
当我在IE中打开但未使用其他浏览器打开时.我了解
使用javascript即可解决问题.这是我的vbscript
< language = vbscript>
thisform.someobject1.someproperty = thisform.someobject2.someproperty
</script>
我需要一个等效的jscript或javascript.
谢谢:)
hello thr, am using vbscript in asp and all the events are responding
whn i open in IE but using other browser they are not. i understand
tat using javascript will solve the problem. here is my vbscript
< language= vbscript>
thisform.someobject1.someproperty=thisform.someobject2.someproperty
</script>
i need an equivalent jscript or javascript.
Thanks :)
推荐答案
好吧,您期望什么?是的,我的Microsoft仅支持VBScript,通常认为它是孤立的.请参见 http://en.wikipedia.org/wiki/VBScript [ http ://www.devx.com/DevX/Article/15821 [ ^ ].
您有充分的理由切换到Javascript/ECMAScript. :-)
代替您使用的语法,请执行以下操作:
Well, what did you expect? Yes, VBScript is supported my Microsoft only and generally considered orphaned. See http://en.wikipedia.org/wiki/VBScript[^], http://www.devx.com/DevX/Article/15821[^].
You have a good reason to switch to Javascript/ECMAScript. :-)
Instead of the syntax you use, do this:
document.getElementById("myFormId").SomeProperty =
document.getElementById("myObjectId").SomeProperty;
假设您在要访问的元素上定义属性id="myFormId"
或id="myObjectId"
等.
Assume you define the attribute id="myFormId"
or id="myObjectId"
, etc., on the elements you want to access.
这篇关于如何在ASP中使用JScript触发对象事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!