Помощник
|
Скрытая форма |
Влад_hb
|
Сообщение
#1
|
||
|
|
||
|
|||
Влад_hb
|
Сообщение
#2
|
|
|
Я нащел код, но там нужно исправить ошыбки:
Когда нажимаеш, чтоб перетащить - форма бегает за курсором и "неотпускаеться". <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1251"> <title>Проверка</title> <script language="JavaScript1.2"> var dragswitch=0 var nsx var nsy var nstemp function drag_dropns(name){ temp=eval(name) temp.captureEvents(Event.MOUSEDOWN | Event.MOUSEUP) temp.onmousedown=gons temp.onmousemove=dragns temp.onmouseup=stopns } function gons(e){ temp.captureEvents(Event.MOUSEMOVE) nsx=e.x nsy=e.y } function dragns(e){ if (dragswitch==1){ temp.moveBy(e.x-nsx,e.y-nsy) return false } } function stopns(){ temp.releaseEvents(Event.MOUSEMOVE) } var dragapproved=false function drag_dropie(){ if (dragapproved==true){ document.all.showimage.style.pixelLeft=tempx+event.clientX-iex document.all.showimage.style.pixelTop=tempy+event.clientY-iey return false } } function initializedragie(){ iex=event.clientX iey=event.clientY tempx=showimage.style.pixelLeft tempy=showimage.style.pixelTop dragapproved=true document.onmousemove=drag_dropie } if (document.all){ document.onmouseup=new Function("dragapproved=false") } ////drag drop functions end here////// function hidebox(){ if (document.all) showimage.style.visibility="hidden" else if (document.layers) document.showimage.visibility="hide" } </script> </head> <body> <div id="showimage" style="position:absolute;width:250px;left:250;top:250"> <table border="0" width="250" bgcolor="#000080" cellspacing="0" cellpadding="2"> <tr> <td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0" height="36"> <tr> <td onMousedown="initializedragie()" style="cursor:hand" width="100%"><ilayer width="100%" onSelectStart="return false"><layer width="100%" onMouseover="dragswitch=1;drag_dropns(showimage)" onMouseout="dragswitch=0"><font face="Verdana" color="#FFFFFF"><strong><small>Рекламное объявление</small></strong></font></layer></ilayer></td> <td style="cursor:hand"><a href="#" onClick="hidebox();return false"><img src="close.gif" width="16" height="14" border=0></a></td> </tr> <tr> <td width="100%" bgcolor="#FFFFFF" style="padding:4px" colspan="2"> <small><strong><font face="Verdana">Главная страница- <a href="home.htm">Показать!</a></font></strong></small><br> <small><font face="Verdana">Самая замечательная в Мире Главная страница! Самая пустая в Мире Главная страница! Не ходите дети в Африку гулять!</font></small> </td> </tr> </table> </td> </tr> </table> </div> </body> </html>
|
|
|
||
|
Похожие темы
Тема | Ответов | Автор | Просмотров | Последний ответ | |
---|---|---|---|---|---|
Скрытая реклама на форумах! Предлагаем услуги! | 51 | Drayfer | 25157 | 20.4.2021, 13:25 автор: Drayfer |
|
170 форумов всех новостроек Московской области - скрытая реклама | 5 | St14 | 3102 | 8.9.2016, 17:28 автор: St14 |
|
Форма регистрации вордпресс. Привязка ссылок | 0 | plscomeback | 5608 | 29.3.2016, 19:29 автор: -plscomeback- |
|
Калькулятор + форма заказа | 0 | adsprosto | 7315 | 11.4.2015, 0:30 автор: -adsprosto- |
|
почтовая форма | 2 | Nicolai_hb | 4341 | 31.8.2014, 13:15 автор: -wieppir- |
Текстовая версия | Сейчас: 25.4.2024, 15:50 |