English 中文(简体)
Cannot setprofile:hidden through Java
原标题:Cannot set visibility:hidden via JavaScript

我有一点麻烦,要把我头 around在这件事情上,因此,我认为这可能有助于把它放在这里。 因此,情况就是如此。

www.un.org/Depts/DGACM/index_spanish.htm 我拥有: 在5个不同的桌子中,有5个不同的图像,加上我寄出的文字。

www.un.org/Depts/DGACM/index_spanish.htm 我想:使用javascript s...

document.GetElementById("image ID").style.visibility= visible/hidden 

...after a preset time, but, instead of image ID there is a string that gets the ID of the image, and before anyone says anything, I am not using "" for the string that is inside of (). Something like...

var n=1;
function picID() {    
pictureID="pic"+n;
n=n+1;
}

......这样,每次被称为“pic1”、“>>>、“<>pic2”、“>>>、[>pic3”等要素。

www.un.org/Depts/DGACM/index_spanish.htm 我的问题是:,挣钱物赢得了打工。 图像打字仍与我在成像标签中定义的一样。

所有图像识别仪都属于 im子,就像它一样。

www.un.org/Depts/DGACM/index_spanish.htm 全文:

<script>
var m=1;
        function Show() {
        if (m==6) {m=1;}

    feat="feat"+m;
        **document.getElementById(feat).style.visibility="visible";**
    m=m+1;
    setTimeout( Show() , 3000);
    }
window.onload = Show;
</script>

<script>
var k=1;    
    function Hide() {
    if (k==6) {k=1;}

    feate="feat"+k;
        **document.getElementById(feate).style.visibility="hidden";**
    k=k+1;
    setTimeout( Hide() , 3000);     
    }

window.onload = Hide;
</script>

I ve separated the code so it d easier to spot. From what I ve seen the only issue is the bold line within the code. I ve tested everything else by replacing the document.getElementById with document.write, so I can see that the custom ID string thingy is working fine. It is. An everything else as well.

任何建议? 感谢。

问题回答

提炼窑=0;而不是k = 1;

当你把显示器和隐藏在同一元素上运行时,就会看上去。 以上所述内容将使显示器具的面目上出现隐藏。

This code will keep on running in a loop. because the setTimeOut() is called every time. There should be a case when its not called e.g if m<6 call it else don t





相关问题
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.

热门标签