我有一个RadionButtonList有两个值,点击时我得隐藏我的页面上的一些元素。调用jQuery函数onload和onclick
我得到了下面的代码,点击RadionButton时触发。如何在我的网页的网页加载中调用此功能?
$(document).ready(function() {
$('#<%= columnsRoundPanel.FindControl("rdlClickOrder").ClientID %> input').click(function() {
var clickOrder = $(this).val();
$('#<%= chkColumnList.ClientID %> input').each(function (i) {
var index = ($(this).next('label').text().indexOf(clickOrder));
if ((index == -1) && ($(this).next('label').text() != 'Cost' && $(this).next('label').text() != 'Clicks' && $(this).next('label').text() != 'Impressions')) {
$(this).css('display', 'none');
$(this).next('label').css('display', 'none');
} else {
$(this).css('display', 'inline');
$(this).next('label').css('display', 'inline');
}
});
});
});
什么是RadionButtonList? jQuery没有这样的概念。 –