将div容器传递给javascript函数 [英] pass div container to javascript function

查看:69
本文介绍了将div容器传递给javascript函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨.
各位.我想将div容器传递给外部.js文件中的javascript函数.
我该怎么办?
正确吗?

hi .
dear all. i want to pass div container to javascript function in external .js file.
how i can?
is it correct??

$(document).ready(CollapsPanel("#<%=divContainerRecord.ClientID %>"));

推荐答案

(文档).ready(CollapsPanel(" ));
(document).ready(CollapsPanel("#<%=divContainerRecord.ClientID %>"));


为什么不尝试就问它是否正确?我不这么认为.在新的jquery调用开始时,您需要一个
Why ask if it''s correct without trying it ? I don''t think it is. You need a


.我会在函数内查找div,或者至少编写三行代码来查找div,检查它是否不为null,然后将其传递给方法.
at the start of a new jquery call. I''d look up the div inside the function, or at least write three lines of code to look up the div, check it is not null, then pass it to the method.


这篇关于将div容器传递给javascript函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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