Jump to content

Deomon

Newbie
  • Posts

    4
  • Joined

  • Last visited

Deomon's Achievements

Explorer

Explorer (1/14)

0

Reputation

  1. Не. Не спасает. А вот position=inherit для нового дива - решает. Всем спасибо.
  2. <html> <head> <title>test</title> <script type="text/javascript"> function drawdiv(){ if (document.getElementById("new_div")){ document.body.removeChild(document.getElementById("new_div")); } var d=document.createElement("div"); d.id="new_div"; d.style.position="absolute" d.style.top="50px"; d.style.left="50px"; d.style.background="#009900" d.innerHTML="шминдер бокс" document.getElementById("main").appendChild(d); } </script> </head> <body style="margin:15px 15px 15px 15px; background:#FFFFFF"> <div id="main" style="width:240px; height:385px; float:left; overflow:auto; border:solid 1px #880000" onclick="drawdiv()"> "Get money," she replied; "for you must know that when you reach the ground under the tree, you will find yourself in a large hall, lighted up by three hundred lamps; you will then see three doors, which can be easily opened, for the keys are in all the locks. On entering the first of the chambers, to which these doors lead, you will see a large chest, standing in the middle of the floor, and upon it a dog seated, with a pair of eyes as large as teacups. But you need not be at all afraid of him; I will give you my blue checked apron, which you must spread upon the floor, and then boldly seize hold of the dog, and place him upon it. You can then open the chest, and take from it as many pence as you please, they are only copper pence; but if you would rather have silver money, you must go into the second chamber. Here you will find another dog, with eyes as big as mill-wheels; but do not let that trouble you. Place him upon my apron, and then take what money you please. If, however, you like gold best, enter the third chamber, where there is another chest full of it. The dog who sits on this chest is very dreadful; his eyes are as big as a tower, but do not mind him. If he also is placed upon my apron, he cannot hurt you, and you may take from the chest what gold you will." </div> </body> </html> Несложно увидеть, что создаваемый по клику DIV не скроллируется вместе с текстом основного дива. Можно ли сделать так, чтобы он двигался вместе с текстом?
  3. Цвет его надо поменять. С картинками морочиться неохота. Все. Победил. По крайней мере IE8, FF3.6, Opera11, Chrome - работают. Если кому интересно - напишу.
  4. Есть чекбокс, который программно может менять атрибут disabled=true|false. Естественно, если diasbled=true, он перестаёт обрабатывать события (онклик, по крайней мере). Удивительно но и до родителя он его тоже не пропускает. А очень нужно.... <div id="div1" onclick="doclick(this)" style="z-index:2;"> <input type="checkbox" id="ch1" disabled="true" onclick="doclick(this)" style="z-index:1;"/> </div> вот такая конструкция doclick() не выполняет при щелчке по объекту. А очень хочется. Кто-нибудь бодался?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy