chat.html 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <html dir="ltr" lang="zh">
  2. <head>
  3. <META http-equiv="Content-Type" content="text/html; charset=utf-8">
  4. <style type="text/css">
  5. iframe {
  6. width: 370px;
  7. height: 170px;
  8. }
  9. body {
  10. overflow-y: scroll;
  11. padding-top: 14px
  12. }
  13. .btn-load {
  14. position: absolute;
  15. width: 100%;
  16. font-size: 12px;
  17. text-align: center;
  18. display: block-inline;
  19. top: 0px;
  20. left: 0px;
  21. margin: 3px 0;
  22. }
  23. </style>
  24. <script type="text/javascript">
  25. function AutoResizeImage(maxWidth, maxHeight, objImg) {
  26. var img = new Image();
  27. img.src = objImg.src;
  28. var hRatio;
  29. var wRatio;
  30. var Ratio = 1;
  31. var w = img.width;
  32. var h = img.height;
  33. wRatio = maxWidth / w;
  34. hRatio = maxHeight / h;
  35. if (maxWidth == 0 && maxHeight == 0) {
  36. Ratio = 1;
  37. } else if (maxWidth == 0) {
  38. // if (hRatio<1) Ratio=h Ratio; }else if (maxHeight==0){ if (wRatio<1) Ratio=w
  39. Ratio;
  40. } else if (wRatio < 1 || hRatio < 1) {
  41. Ratio = (wRatio <= hRatio ? wRatio : hRatio);
  42. }
  43. if (Ratio < 1) {
  44. w = w * Ratio;
  45. h = h * Ratio;
  46. }
  47. objImg.style.height = h + 'px';
  48. objImg.style.width = w + 'px';
  49. }
  50. function openInIE(objImg) {
  51. window.location = 'about:blankFile://_' + objImg.src.replace("file:///", "");
  52. // oShell.ShellExecute ( "IEXPLORE", objImg.src, "", "open", "1");
  53. }
  54. </script>
  55. </head>
  56. <body link="#0000FF" vlink="#0000FF" alink="#0000FF" hlink="#0000FF" bgcolor="#fdfdfd" oncontextmenu="location.href='PopMenu';return false;">
  57. <a class="btn-load" id="btnLoad" href="about:blankLoadHistroyMessage">加载更多消息</a>
  58. </body>
  59. </html>