日期:2014-05-16 浏览次数:20444 次
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <style type="text/css"> td { border: solid 1px #185D98; width: 60px; text-align: center; padding: 8px; } </style> <%-- <script src="../js/jquery-1.4.2.min.js" type="text/javascript"></script> <script src="../js/myjs/jquery.floatDiv.bak.js" type="text/javascript"></script>--%> </head> <body style="text-align: center; margin: 5px auto;"> <form id="form1"> <div style="margin: 5px auto; width: 100%; border: solid 1px #F7D1A5; text-align: center;"> <table id="mytable" cellpadding="0" cellspacing="0"> </table> <div style="width: 200px; height: 80px; position: absolute; background-color: #DB0C0C" id="mydiv"> </div> </div> </form> <script type="text/javascript"> window.onload = function() { var div = document.createElement("div"); div.innerHTML = "test div"; document.getElementsByTagName("body")[0].appendChild(div); div.style["top"] = "expression(10)"; }; </script> <div id="floaterBottom" style="width: 780px; height: 80px; border: solid 1px #F7D1A5; background: yellow;"> </div> </body> </html>