実際、私はこれを行う方法を考え出しました。以下は正確に機能するコードではありませんが、私の考えを伝えています。私はこのアイデアを実装しましたが、機能します。ポップアップが上下するたびにページ全体をリロードする必要があるため、複雑なページの欠点があると思います。しかし、良い面としては、これ以上のJavaスクリプトはありません!!! わーい!!!:)
<html>
<body class="classfile.css">
<div <?//add background stuff here?>
<?php
if(isset($_POST["popupmode"]))
echo ' style="opacity:0.15" '; //this will fade out any background stuff
?>
style="height:1000px;with:600"px>
<form method="post" action="thispage.php">
<input type="hidden" name="popupmode">
<input type="submit" value="bring up popup">
</form>
</div>
<?php
if(isset($_POST["popupmode"]))
{
echo '<div style="with:200px;height:200px;top:-800px;left:200px;border-style:raised">';
echo '<form method="post" action="thispage.php">';
echo '<input type="submit" value="bring down popup">';
echo '</form></div>';
}
?>
</body>
</html>