Javascript JS对话框按钮更改大小,非常小
我使用的是Jquery 1.8.3,我注意到在我的对话框中,当用户单击select按钮时(我将按钮文本更改为Apply并在对话框中显示新的div),当按钮文本为Apply时,按钮大小变得异常小 有什么想法吗Javascript JS对话框按钮更改大小,非常小,javascript,jquery,Javascript,Jquery,我使用的是Jquery 1.8.3,我注意到在我的对话框中,当用户单击select按钮时(我将按钮文本更改为Apply并在对话框中显示新的div),当按钮文本为Apply时,按钮大小变得异常小 有什么想法吗 ErrorCodeDialog = $("#treeview").dialog( { closeOnEscape: true, stack: false, autoOpen: true, modal: true, resizable: fal
ErrorCodeDialog = $("#treeview").dialog(
{
closeOnEscape: true,
stack: false,
autoOpen: true,
modal: true,
resizable: false,
draggable: true,
title: 'Select and input Error details',
width: 480,
height: 500,
buttons:
{
Select: function ()
{
var btnText = '';
$('.ui-dialog-buttonpane :button').each(function ()
{
if ($(this).text() == 'Select')
{
btnText = 'Select';
$(this).text('Apply');
$("#errorCodes").attr("style", "display:none;");
$("#inputReps").attr("style", "display:inline;");
}
else if ($(this).text() == 'Apply')
{
btnText = 'Apply';
$(this).text('Select');
$("#errorCodes").attr("style", "display:inline;");
$("#inputReps").attr("style", "display:none;");
}
});
提示:使用开关,使代码更容易阅读。你的css中有什么按钮?他指的是
开关语句。@RachelGallen我没有过度使用我自己的任何样式来制作这个按钮。它使用jquery.ui.dialog.css版本1.8.11i。谢谢你的澄清。