两个不同的脚本用于页面验证摘要 [英] Two different scripts for page validation summary

查看:66
本文介绍了两个不同的脚本用于页面验证摘要的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有两个不同版本的javascript,用于两个不同环境的验证摘要删除。两种环境的代码都是相同的。



环境1:

Hi,
I have two different versions of javascript being rendered for validation summary removal for two different environments. Code for both the environments is the same.

Environment 1:

<script type="text/javascript">
document.getElementById('ValidationSummary1').dispose = function() {     Array.remove(Page_ValidationSummaries, document.getElementById('ValidationSummary1')); }
</script>





环境2:



Environment 2:

<script type="text/javascript">
(function(id) {     var e = document.getElementById(id);     if (e) {         e.dispose = function() {             Array.remove(Page_ValidationSummaries, document.getElementById(id));         }         e = null;     } })('ValidationSummary1');
</script>





能帮助我找出原因吗?还有环境1代码发生的其他问题,我怀疑是因为呈现的JS不同。环境2没有问题。



Rgds

Raveesh



Can you please help me identify why is this happening. Also there are other issues happening with environment 1 code which I suspect is because of the different JS being rendered. Environment 2 is free of issues.

Rgds
Raveesh

推荐答案

您的两个系统正在运行不同版本的ASP.NET。第一个代码块由v2.0 / v3.5生成,而第二个代码块由v4.5生成。



(我没有v4.0程序集的副本,以检查v3.5和v4.0之间或v4.0和v4.5之间是否发生了更改。)
Your two systems are running different versions of ASP.NET. The first code block is generated by v2.0 / v3.5, whereas the second code block is generated by v4.5.

(I don't have a copy of the v4.0 assembly to check whether the change happened between v3.5 and v4.0 or between v4.0 and v4.5.)


这篇关于两个不同的脚本用于页面验证摘要的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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