隐藏例如长时间的文本框,然后显示它 [英] hidden for example textbox for a long time and then display it

查看:79
本文介绍了隐藏例如长时间的文本框,然后显示它的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何隐藏例如文本框很长时间,然后在这段时间之后显示它,然后这段时间继续
如果使用Java脚本或jquery将此链接到asp.net
并在每个人的脸上给我代码,谢谢我.

hi how can i hidden for example textbox for a long time and then display it after this timeand then this period continue
if this with java script or jquery how link this to asp.net
and in everyface give code to me thanks

推荐答案

根据我对问题的了解,您希望在网页中隐藏控件,并在一段时间后显示它.您可以在JavaScript中执行类似的操作.

From what I understand from your question, you want to hide a control from your webpage and display it after some time. You can do something like this in JavaScript.

var myTextbox = document.getElementById('myTextbox');
myTextbox.style.display = 'none';
setTimeout('DisplayControl', 10000); //Display it after 10 seconds

function DisplayControl() {
    var myTextbox = document.getElementById('myTextbox');
    myTextbox.style.display = 'block';
}




在这里,我为您的要求编写了一些代码,请检查一次


Hi,

Here I write some code for your requirement check this once


<input type="text" name="data" id="data" style =" display :none;">



在设计中,我采用了一个html文本框

而javascript包含以下代码



In the desing I take one html textbox

And javascript contains following code

var e = 0;
   var tmp;
   function f1() {
       e = parseInt(e) + 1;
       if (parseInt(e) == 30) {
           document.getElementById("data").style.display = '';
       }
       tmp=setTimeout("f1()", 300);
}



而且您必须在页面的onload事件中添加此f1函数,如



And you''ve to add this f1 function in onload event of page like

<body onload ="f1()" >



该方法很重要

希望对您有帮助

最好的



That method counts the time

I hope this helps you

All the Best


这篇关于隐藏例如长时间的文本框,然后显示它的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆