English 中文(简体)
部分对另一要素的立场
原标题:Bind the position of an element to another element s position

是否有办法使某一要素保持与另一个要素相同的地位?

有一个文本框和一个<代码><span>。 如何让<代码><span>总是与文本箱重叠,即是否对文本加以约束? 而且,当文本箱出于任何原因移动时,我也希望有<条码>和编号;

我想到的是<代码>Interval,该编码对二次数次进行制衡,并适当移转<span>,然而,我认为,这既昂贵又是一小trick。

感谢任何倾斜。

最佳回答

除非我误解你的问题,否则,你可以将<代码><span> and the <input category=“text”/>放在同一母集装箱内,如<div>而不是<input category=“text”/>

问题回答

如果你控制文本箱移动的时间,你也可以触发时间的移动。 否则,我就不了解任何会比你确定的间隔期更好发挥作用的事件。





相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签