Je suis novice en écriture de code, alors j'espère que vous pourrez m'aider ! ! ! ! ! !
Copiez le code comme suit :
<html>
<tête>
<title>Effet pop-up js</title>
<méta http-equiv="content-type" content="text/html charset=gb2312">
<script langage="javascript" src="jquery-1.4.js"></script>
</tête>
<langage de script="javascript">
//document.body.offsetWidth="512px";
fonction min(){
$("#dv").css("display","block");
var a = $(document).hauteur();
var b = $(window).width();
var h =$(fenêtre).hauteur();
f = (b-300)/2;
d =(h-300)/2;
$("#dv").css("margin-top",d);
$("#dv").css("marge-gauche",f);
$("#zhezhao").toggle();
$("#zhezhao").css("largeur",b);
$("#zhezhao").css("hauteur",a);
}
fonctionnin(){
$("#dv").css("display","aucun");
$("#zhezhao").toggle();
}
</script>
<corps>
<div style="display:none;position:absolute;z-index:100;background:#ccc" id="zhezhao"></div>
<input type="button" value="Click" onclick="mina()">
<div id="dv">
<div><span id="ss"style="width:30px;height:30px;border:1px solid blue;background:black;float:right;" onclick="nin()"></span></ div>
</div>
<table align="centre">
<tr>
<td align="center">haha</td>
</tr>
</table>
</corps>
</html>
Si cela vous aide, le télécharger n’est pas vain ! ! ! ! ! ! (besoin de comprendre le framework jquery)