我在 的帮助下创建了一个按钮<div>
。现在我想像普通的 asp 按钮一样禁用该按钮......我怎样才能在 jQuery 的帮助下做到这一点?
function createButton(buttonName) {
var buttonHtml = '<div id=' + buttonName + ' class="dynamicButton" onclick="' + buttonResources[buttonName + 'OnClick'] + '">' + '<div id="' + buttonName + 'Div" class="buttonImage"><img id="' + buttonName + 'Img" src="' + buttonResources[buttonName + 'Image'] + '"></div>' + '<div class="buttonCaption">' + '<label class= "pointerCursor" id="' + buttonName + 'LabelDiv">' + buttonResources[buttonName + 'Caption'] + ' </label>' + '</div>' + '</div>';
var panelName = buttonResources[buttonName + 'Panel'];
if ($('#' + panelName + '').length == 0) {
createNewPanel(panelName);
}
addButtonToPanel(panelName, buttonHtml, buttonName);
}