高新区孵化器:怎样在文本框中通过点击按扭产生一个大于0小于1000的随机整数?
来源:百度文库 编辑:神马品牌网 时间:2024/10/06 18:42:54
要的是代码,谢谢。
用VB编写,将command1 click的程序代码写出。
用VB编写,将command1 click的程序代码写出。
<script>
function test()
{
document.getElementById("input1").value=(Math.floor(Math.random()*999+1));
}
</script>
<input type="text" id="input1">
<input type="button" onclick="test()" value="确定">
你用什么开发工具啊?
在DELPHI里是这样的:
var
i: Integer;
begin
i := Random(1001);
Edit1.Text := IntToStr(i); //Edit1就是文本框
end;
int(ran(1)*1000)
这是一个网页,
<script language=vbscript>
sub aa()
dim thevalue
randomize
thevalue=int(rnd(1)*1000)+1
document.f1.text1.value=thevalue
end sub
</script>
<body>
<form name="f1">
<input type=text id=text1 name="text1">
<br>
<input type=button value="show" onclick="aa">
</form>
</body>
怎样在文本框中通过点击按扭产生一个大于0小于1000的随机整数?
InDesign 中怎样在文本框中再插入一个文本框?
vb中如何在文本框中加入文字?比如有若干个按钮,点击一个就向该文本框中加入一句话。该用什么样的语句呢
怎样在VB中实现在文本框中输入用户名和密码后点击按钮进入另一个页面
怎样实现在文本框中按回车键,光标跳到下一个文本框,而不是提交?
在VB.net中怎样将窗体中文本框的数据保存到一个*.htm中?
怎样在网页文本框中插入图片
在c++的mfc中怎样从一个文本框中获得文本?
请问:如何在aspx页面中实现点击文本框出现日期选择,并且所选的时间进入文本框中?
在excel中怎样插入一个文本框指向图表中的最大值啊?