シンプルで飾り気のないモーダル (コンテンツが少ない) が必要な場合は、次のように JavaScript アラートを使用できます。
alert('Hello from a modal popup');
よりきれいなオプションが必要な場合、一般的な解決策は、モーダル オプションを可能にする jQuery UI のダイアログを使用することです。このオプションで得られるもののデモについては、こちらをご覧ください。
http://jqueryui.com/demos/dialog/#modal
コードは非常に単純です。以下は、スクリプトとストック jQuery UI CSS のソースとして Google の CDN を使用して、すべてを行う必要があります。
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.js" type="text/javascript"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.js" type="text/javascript"></script>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.21/themes/base/jquery-ui.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
$(function() {
$( "#details" ).dialog({
modal: true
});
});
</script>
<div id="details">
Hello from a modal popup
</div>