Модератор: [mweb team]
Padonak писал(а):2Berezkin: пацкажу что значит загадочнайа строка var picT = ppic.style.top.substring(0, ppic.style.top.length - 2); - это значение style.top без px (т.е. только число)
Ваше сообщение было получено, но еще не было прочитано.
Спасибо (для нормальных людей)
или
Идите нахрен (для спаммеров)
С уважением, Квентин Карлович Буратино
function findCenter(){
var ppic = top.document.getElementById("picture");
ppic.style.position = "absolute";
ppic.style.left = top.document.body.clientWidth/2 + "px";
ppic.style.top = top.document.body.clientHeight/2 + "px";
//var picT = ppic.style.top.substring(0, ppic.style.top.length - 2); - хз что за строка
}
<!--
function showPic(pic){
// проверяем не показывается ли в данный момент
// какая-нибудь большая кортинко и если да - уничтожаем ее
if(document.getElementById("picture")){document.body.removeChild(document.getElementById("picture"));}
// создаем див и вставляем в него нашу кортинко
var ppic = top.document.createElement("div");
ppic.setAttribute("id","picture");
ppic.style.position = "absolute";
ppic.style.zIndex = "2";
ppic.style.top = 0 + "px";
ppic.style.left = 0 + "px";
ppic.style.color = "#000";
ppic.style.backgroundColor = "#e0dfe3";
ppic.style.border = "2px outset #fff";
ppic.style.padding = "10px 10px 10px 10px";
ppic.innerHTML = "<img src='" + pic + "' title='скрыть' alt='' style='cursor:pointer' onload='setTimeout(\"findCenter()\",100)'>";
top.document.body.appendChild(ppic);
ppic.onclick = function(){top.document.body.removeChild(this)};
}
function findCenter(){
var ppic = top.document.getElementById("picture");
ppic.style.left = parseInt(document.body.clientWidth/2 - ppic.offsetWidth/2)+ "px";
ppic.style.top = parseInt(document.body.clientHeight/2 - ppic.offsetHeight/2) + document.body.scrollTop + "px";
}
//-->
<div style="float:right"> МЕНЮ </div>
position: absolute; top: 0;
<td vertical-align:middle>
<div style="float:right"> МЕНЮ МЕНЮ МЕНЮ МЕНЮ </div>
<p> xxxxxxxxx </p>
<p> xxxxxxxxx </p>
<p> xxxxxxxxx </p>
</td>
...
</table>
<script language="JavaScript" type="text/javascript">
<!--
var tds = document.getElementsByTagName("TD");
for(var i = 0; i < tds.length; i++){
if(tds[i].className !== "noleft"){continue;}
else{
var temp = tds[i].innerHTML;
tds[i].innerHTML = "";
var menu = document.createElement("div");
menu.innerHTML = '<a class="menu2" href="#null" onclick="window.scrollTo(0,0)" title="К оглавлению"><b><big>↑</big></b></a> <a class="menu2" href="#lot1">Лот 1</a> <a class="menu2" href="#lot2">Лот 2</a> <a class="menu2" href="#lot3">Лот 3 </a> <a class="menu2" href="#lot4">Лот 4 </a> <a class="menu2" href="#lot5">Лот 5 </a>';
menu.style.display = "block";
// это для того чтобы в некоторых браузерах не рвало меню
menu.nowrap = "nowrap";
tds[i].appendChild(menu);
menu.style.position = "absolute";
menu.style.top = tds[i].offsetTop + menu.offsetHeight + 20 + "px";
menu.style.left = tds[i].offsetLeft + tds[i].offsetWidth - menu.offsetWidth + "px";
tds[i].innerHTML += "<br><br>" + temp;
}
}
//-->
</script>
</body>
</html>
<td vertical-align:middle>
<div style="float:right"> МЕНЮ МЕНЮ МЕНЮ МЕНЮ </div>
<p> xxxxxxxxx </p>
<p> xxxxxxxxx </p>
<p> xxxxxxxxx </p>
</td>
<td align="center">
<table width="100%" border="0" cellspacing="0" cellpadding="5">
<tbody>
<tr>
<td align="right">
<div> МЕНЮ МЕНЮ МЕНЮ МЕНЮ </div>
</td>
</tr>
<tr>
<td>
<p> xxxxxxxxx </p>
<p> xxxxxxxxx </p>
<p> xxxxxxxxx </p>
</td>
</tr>
</tbody>
</table>
</td>
TD.border-t {border-top-color: #999999; border-top-style: solid; border-top-width: 1px}
TD.border-l {border-left-color: #999999; border-left-style: solid; border-left-width: 1px}
<td class="border-t border-l">
CSS:
table.border {border-top: 1px solid gray; border-left: 1px solid gray}
html:
<table cellspacing="0" cellpadding="0" style="width: 1000px" align="center" class="border">
удаляю ее из ненужных клеток:
<td height="9" colspan="8" class="gif02" style="border-left: none">
<td width="9" class="gif01" style="border-top: none">
table {border-collapse: collapse;}
.border {border: 1px solid gray;}
CSS:
table.border {border-top: 1px solid gray; border-left: 1px solid gray}
html:
<table cellspacing="0" cellpadding="0" style="width: 1000px" align="center" class="border">
<td height="9" colspan="8" class="gif02" style="border-left: none">
<td width="9" class="gif01" style="border-top: none">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled</title>
</head>
<style>
.border {border-top: gray 1px solid; border-left: gray 1px solid;}
</style>
<body>
<table cellspacing="0" cellpadding="0" width="100" align="center" border="0">
<tr>
<td class="border">text text</td>
<td>111</td>
</tr>
<tr>
<td colspan="2">222</td>
</tr>
</table>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled</title>
</head>
<style>
.border {border-top: gray 1px solid; border-left: gray 1px solid;}
</style>
<body>
<table cellspacing="0" cellpadding="0" width="100" align="center" border="0">
<tr>
<td class="border">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td>1</td>
<td>2<?td>
<td>3</td>
</tr>
<tr>
<td>4</td>
<td>5<?td>
<td>6</td>
</tr>
</table>
</td>
<td>111</td>
</tr>
<tr>
<td colspan="2">222</td>
</tr>
</table>
</body>
</html>
<META http-equiv=Page-Enter content=blendTrans(Duration=0.5)>
<META http-equiv=Page-Exit content=blendTrans(Duration=0.5)>
<META http-equiv=Site-Enter content=blendTrans(Duration=0.5)>
<META http-equiv=Site-Exit content=blendTrans(Duration=0.5)>
<a href="#null" onClick="window.open
('http://wordstat.yandex.ru/advq?key=&rpt=hist&shw=0&text=%EA%F3%EF%E8%F2%FC%20%F6%E2%E5%F2%EE%EC%F3%E7%FB%EA%F3&tm=', 'newWin', 'Toolbar=0, Location=0, Directories=0, Status=0, Menubar=0, Scrollbar=0, Resizable=1, Copyhistory=1, Width=700, Height=500')"> особенно высок. </a>
function openYandex() {
window.open
('http://wordstat.yandex.ru/advq?key=&rpt=hist&shw=0&text=%EA%F3%EF%E8%F2%FC%20%F6%E2%E5%F2%EE%EC%F3%E7%FB%EA%F3&tm=', 'newWin', 'Toolbar=0, Location=0, Directories=0, Status=0, Menubar=0, Scrollbar=0, Resizable=1, Copyhistory=1, Width=700, Height=500');
}
<a href="#null" onClick="openYandex();">особенно высок.</a>
<script language="JavaScript" type="text/javascript" src="имя_файла.js"></script>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>HTML-код кнопки</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
</head>
<body background="img/button.gif" text="Navy">
<font face="Arial" size="-1" color="Navy"> Если Вам понравился наш ресурс, или Вам близка и интересна наша тематика, Вы можете поставить ссылку на нас. Для этого скопируйте нижеследующий HTML-код и вставьте его на Вашей странице. </font>
<form action="">
<p>HTML код:<br>
<textarea name="описание" cols="60" rows="4" ></textarea>
<a href="http://www.colormusic.ru"><img src="http://www.colormusic.ru/img/banner.gif" width="88" height="31" border="0" alt="COLORMUSIC.RU - Цветомузыкальные приставки на любой вкус!" title="COLORMUSIC.RU - Цветомузыкальные приставки на любой вкус!"></a>
<br>
<input type="reset" value="Обновить код">
</p>
</form>
<font face="Arial" size="-1" color="Navy"> Выглядеть это будет так: </font>
<a href="http://www.colormusic.ru"><img src="http://www.colormusic.ru/img/banner.gif" width="88" height="31" border="0" alt="COLORMUSIC.RU - Цветомузыкальные приставки на любой вкус!" title="COLORMUSIC.RU - Цветомузыкальные приставки на любой вкус!"></a>
</body>
</html>
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 48