작동하지 I가 다음 스크립트 :jQuery를 대화 제대로
<script type="text/javascript">
$("#addLocation").dialog({
autoOpen: false,
modal: true,
height: 700,
width: 550,
buttons: {
"Add Location": function() {
document.forms["mapform"].submit();
},
Cancel: function() {
$(this).dialog("close");
}
},
});
</script>
<script type="text/javascript">
function showLocationDialog() {
$("#addLocation").dialog("open");
}
</script>
<div id="addLocation" style="display:none;">
<form action="" method="post" name="mapform">
<input type="text" name="name" />
<input type="submit" />
</form>
</div>
<button onclick="javascript:showLocationDialog();">Add an address</button>
이 버튼은 대화 상자를 열지 않고 ... 사람이 도움을 줄 수 왜 이해할 수 없다?
감사합니다,
그건별로 좋은 생각이 아닙니다. 인라인 CSS는 dom이 준비되기 전에 * 양식을 숨 깁니다. 두 가지 이점이 있습니다. 첫째, 사용자는 무언가를 보지 않고 사라지는 것을 보게됩니다. 혼란스럽고 브라우저가로드하는 동안 자원 렌더링을 낭비하지 않습니다. dom이 준비되어 대화 상자()가 그것을 숨길 때 다시 렌더링됩니다. – davin