应用母版页后的javascript问题 [英] problem of javascript after applying master page

查看:58
本文介绍了应用母版页后的javascript问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

< b></b>当我在应用母版页后使用我的页面时,我的页面中的Java脚本无法正常工作<< div class ="h2_lin">解决方案

检查您的JavaScript文件的引用是否正确.

使用母版页时,控件的运行时ID也会更改.这可能是导致您出现问题的原因.

请尝试使用以下语法来获取控件的运行时ID.

  var  txtTestId = '  <%= txtTest.ClientID%>'; 


<b></b>When i use my page after applying Master Page then the java script in my Page Not work Properly<please help me fast

解决方案

Check reference of your JavaScript file is correct.

Also run-time Ids of your controls gets changed when you use Master Page. This could be a cause of your Problem.

Try by using below syntax to get run-time Ids of your controls.

var txtTestId = '<%= txtTest.ClientID %>';


这篇关于应用母版页后的javascript问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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