나는 (아직) JavaScript 전문가가 아니다. 아래 줄 수를 줄이는 방법을 찾아 내려고 노력 중입니다 ... if 문을 사용할 수있는 단축키가 있습니까?코드 줄 줄이기
function showDialog(divID)
{
var dialogDiv = $("#" + divID);
var height = 500;
var width = 400;
var resizable = false;
if (dialogDiv.attr("height") != "")
{
height = parseInt(dialogDiv.attr("minHeight"));
}
if (dialogDiv.attr("width") != "")
{
width = parseInt(dialogDiv.attr("minWidth"));
}
if (dialogDiv.attr("resizable") != "")
{
resizable = dialogDiv.attr("resizable");
}
dialogDiv.dialog
(
{
resizable: resizable,
width: width,
height: height,
bgiframe: true,
modal: true,
autoOpen: false,
show: 'blind'
}
)
dialogDiv.dialog("open");
}
하나의 참 맞춤 스타일 http://en.wikipedia.org/wiki/Indent_style#Variant:_1TBS – nickf