请教一个关于widow.prompt("提示字符串","A")的问题

时间:2023-01-07 15:48:19
用widow.prompt("提示字符串","A")
当用户点击确定时,返回用户输入的“A”,但是我不知道它返回到哪里了,我怎样得到它返回的这个“A”值呢,请高手指点哦

9 个解决方案

#1


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script language="javascript">
function Event()
{
pro = prompt("提示字符串","A");
alert(pro);
}
</script>
</head>

<body>

<form>
    <input type="button" value="带输入框的对话框" onclick="Event()" />
</form>
</body>
</html>

这段就可以显示输入的A,如果想用其他东西显示道理是一样的,只不过将xx.value=pro就可以了

#2


那我在.ASPX页面上如何调用,请继续赐教

#3


...................o888888o.o88888888o.    
.................8888888888888888888888888o.    
...............888::::888888888888888888888888o.    
.............88::::::::88888888888888888888888888o.    
...........o8:::::::::888::顶88888888888888888888888.    
..........8888:8::::::8:::::::::顶88888888888888888888.    
.........8888::::8888::::::::::::::::顶88888888888    88    
........8888:::888888888::::::::::::::::顶888888888  8    
.......88.88888888888888888:::::::::::::顶88888888888    
......88..888888888888888888:::::::::::顶88888888888888    
......88.888888888888888888888::::::::顶88888888888888888    
......8..8888888888888888888888::::::顶88888888888888888888    
........8888888888888888::88888:::::顶8888888888888888888888    
......88888888888888888::::8888::::顶8888888888888888    8888    
.....88888888888888888::::8888::::顶:8::***::888888888  888    
....88888888888888888::::888:::::顶::::****::888888888  88    
..888888888888888888::::88::::::顶:::::::::::::888888888 88    
.8888888888888888888::::8::::::顶:::::::::::::顶888888888 88    
888...8888888888::88::::8:::::顶:::8oo8::::::88888888888888 8    
88...88888888888:::8:::::::::顶:::::::::::::88888888888888888    
.8..8888888888888:::::::::::顶::"8888888":::顶88888888888888888    
..8888888888::888::::::::::顶:::::"8*8"::::顶88888888888888888888    
.888888888:::::88:::::::::顶88::::::::::::顶88888888888888888888888    
8888888888:::::8:::::::::顶88888::::::::顶888888888888888888888888888    
888888888:::::8:::::::::顶8888888ooooo顶8888888888888888888888888888888    
888888.顶::::::::::::::顶8888888888::::::顶8888888888888888    888888888    
8888..顶:::::::::::::::顶88888888888::::::顶8888888888888888 8888888      
88888顶:::::::::::::顶88888888888888888::::::顶8888888888888   88888    
...88.顶:::::::::::::8888:88888888888888888:::::顶顶888888888   8888    
...88.顶:::::::::::8888顶::88888::888888888888:::::顶顶88888   888    
...8...顶::::::::::8888顶:::8888:::::88888888888::::::顶顶88   888    
.......8顶:::::::8888顶:::::888:::::::88:::8888888:::::::顶顶  88    
......88顶:::::::8888顶::::::88:::::::::8:::::888888::::::::顶顶 88    
.....8888顶:::::888顶:::::::::88::::::::::顶::::8888::::::::::::顶 8    
....88888:顶::::888顶::::::::::8:::::::::::顶::::888::::::::::::::顶    
...88.888:顶:::888:顶::::::::::8::::::::::::顶::888::::::::::::::::顶    
...8.88888顶:::88::顶::::::::::::::::::::::::顶:88::::::::::::::::::顶    
.....88888顶:::88::顶:::::::::::::::::::::::::顶88:::::::::::::::::::顶    
.....88888顶:::88::顶:::::::::::::::::::::::::顶:8::::::::::::::::::::顶    
....888888顶::::8::顶::::::::::::::8888::::::::顶8::::::::::::8888:::::顶    
....88888..顶:::8::顶顶:::::::::::888888:::::::顶::::::::::::888888::::顶    
....8888...顶顶:::::顶顶::::::::::888888:::::::顶顶::::::::::888888::::顶    
....8888....顶:::::::顶顶::::::::::8888:::::::顶顶顶::::::::::8888::::顶    
.....888....顶顶::::::顶顶顶:::::::::::::::::顶顶::顶::::::::::::::::顶    
......88.....顶::::::::顶顶顶顶:::::::::::顶顶顶:::顶顶:::::::::::::顶    
.......88....顶顶:::::::::顶顶顶顶顶顶顶顶顶顶:::::::顶顶顶顶顶顶顶顶    
........88....顶顶::::::::::::顶顶顶顶顶顶顶::::::::::::顶顶顶顶顶    
.........88...8顶顶::::::::::::::::::::::::::::::::::::::::顶    
..........8...88顶顶::::::::::::::::::::::顶:::顶::::::::::顶    
..............888顶顶::::::::::::::::::顶顶::::::顶顶::::::顶    
.............88888顶顶:::::::::::::::顶顶顶:::::::顶顶:::::顶    
.............888888顶顶:::::::::::::顶顶顶:::::::::顶顶:::顶    
............88888888顶顶:::::::::::顶顶顶:::::::::::顶:::顶    
...........88.8888888.顶::::::::顶顶顶::::::::::::::顶::顶    
...........8..888888..顶::::::顶顶:::::::::::::::::顶::顶    
..............888888..顶:::::顶:::::::::::::::::::顶::顶顶    
.............888888...顶::::顶::::::::::::::::::::::::顶顶    
.............888888...顶::::顶::::::::::::::::::::::::顶:顶    
.............88888...顶::::::::::::::8::::::::::::::::顶::顶    
............88888...顶:::::::::::::::88::::::::::::::::顶::顶    
...........88888...顶::::::::::::::::8::::::::::::::::::顶::顶    
..........88888...顶:::::顶:::::::::::::::::::::顶::::::::顶::顶    
..........8888...顶:::::顶:::::::::::::::::::::::顶顶::::::顶::顶    
.........8888...顶:::::顶:::::::::::::::::::::::顶顶顶:::::::顶:顶    
........888....顶:::::顶顶::::::::::::::::::::::顶顶顶::::::::顶:顶    
......8888....顶::::::顶顶:::::::::::::::::::::顶顶顶::::::::: 顶:顶    
.....888......顶:::::顶:::::::::::::::::::::::顶顶::::::::::::::顶:顶    
..8888.......顶::::::::::::::::::::::::::::::顶::::::::::::::::::顶:顶    
.............顶::::::::::::::::::::::::::::::::::::::::::::::::::顶:顶    
............顶::::::::顶:::::::::::::::::::::::::::::::::::::::::顶:顶    
............顶::::::::顶:::::::::::::::::顶::::::::::::::::::::::顶:顶    
...........顶::::::::::顶::::::::::::::顶::::::::::::::::::::::::顶:顶    
...........顶:::::::::::顶8::::::::8:顶:::::::::::::::::::::::::顶:顶8    
...........顶::::::::::::88888888888顶:::::::::::::::::::::::::::顶:顶    
...........顶:::::::::::::88888888顶:::::::::::::::::::::::::::顶:顶8    
...........顶::::::::::::::888888顶::::::::::::::::::::::::::::顶:顶    
...........顶:::::::::::::::88888顶:::::::::::::::::::::::::::顶:顶    
...........顶:::::::::::::::::88顶::::::::::::::::::::::::::::顶顶    
...........顶:::::::::::::::::::顶:::::::::::::::::::::::::::顶顶    
...........顶:::::::::::::::::::顶::::::::::::::::::::::::::顶顶    
............顶:::::::::::::::::顶::::::::::::::::::::::::::顶顶    
............顶:::::::::::::::::顶::::::::::::::::::::::::::顶    
.............顶:::::::::::::::顶::::::::::::::::::::::::::顶    
.............顶:::::::::::::::顶:::::::::::::::::::::::::顶    
..............顶:::::::::::::顶:::::::::::::::::::::::::顶    
..............顶:::::::::::::顶:::::::::::::::::::::::顶    
...............顶:::::::::::顶:::::::::::::::::::::::顶    
...............顶:::::::::::顶::::::::::::::::::::::顶    
................顶:::::::::顶::::::::::::::::::::::顶    
................顶:::::::::顶:::::::::::::::::::::顶    
.................顶:::::::顶:::::::::::::::::::::顶    
..................顶::::::顶::::::::::::::::::::顶    
..................顶:::::顶::::::::::::::::::::顶    
...................顶:::顶::::::::::::::::::::顶    
...................顶::顶::::::::::::::::::::顶    
....................顶:顶:::::::::::::::::::顶    
....................顶顶:::::::::::::::::::顶    

#4


说一下你是想传值给后台吗?

这个JS语句是否是动态生成的?

#5


我是想传值给后台的,

#6


比方说单击一个按钮提示让输入密码,然后我要获取用户输入的密码,来做验证啊

#7


可以实现, 你具体想实现的功能是? 可以加QQ 343397317 交流

#8


可以将值存在控件里.例如hidden.cs里读取 控件的值就可以了

#9


Atribut.add("控件","javascript代码");试一下

#1


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script language="javascript">
function Event()
{
pro = prompt("提示字符串","A");
alert(pro);
}
</script>
</head>

<body>

<form>
    <input type="button" value="带输入框的对话框" onclick="Event()" />
</form>
</body>
</html>

这段就可以显示输入的A,如果想用其他东西显示道理是一样的,只不过将xx.value=pro就可以了

#2


那我在.ASPX页面上如何调用,请继续赐教

#3


...................o888888o.o88888888o.    
.................8888888888888888888888888o.    
...............888::::888888888888888888888888o.    
.............88::::::::88888888888888888888888888o.    
...........o8:::::::::888::顶88888888888888888888888.    
..........8888:8::::::8:::::::::顶88888888888888888888.    
.........8888::::8888::::::::::::::::顶88888888888    88    
........8888:::888888888::::::::::::::::顶888888888  8    
.......88.88888888888888888:::::::::::::顶88888888888    
......88..888888888888888888:::::::::::顶88888888888888    
......88.888888888888888888888::::::::顶88888888888888888    
......8..8888888888888888888888::::::顶88888888888888888888    
........8888888888888888::88888:::::顶8888888888888888888888    
......88888888888888888::::8888::::顶8888888888888888    8888    
.....88888888888888888::::8888::::顶:8::***::888888888  888    
....88888888888888888::::888:::::顶::::****::888888888  88    
..888888888888888888::::88::::::顶:::::::::::::888888888 88    
.8888888888888888888::::8::::::顶:::::::::::::顶888888888 88    
888...8888888888::88::::8:::::顶:::8oo8::::::88888888888888 8    
88...88888888888:::8:::::::::顶:::::::::::::88888888888888888    
.8..8888888888888:::::::::::顶::"8888888":::顶88888888888888888    
..8888888888::888::::::::::顶:::::"8*8"::::顶88888888888888888888    
.888888888:::::88:::::::::顶88::::::::::::顶88888888888888888888888    
8888888888:::::8:::::::::顶88888::::::::顶888888888888888888888888888    
888888888:::::8:::::::::顶8888888ooooo顶8888888888888888888888888888888    
888888.顶::::::::::::::顶8888888888::::::顶8888888888888888    888888888    
8888..顶:::::::::::::::顶88888888888::::::顶8888888888888888 8888888      
88888顶:::::::::::::顶88888888888888888::::::顶8888888888888   88888    
...88.顶:::::::::::::8888:88888888888888888:::::顶顶888888888   8888    
...88.顶:::::::::::8888顶::88888::888888888888:::::顶顶88888   888    
...8...顶::::::::::8888顶:::8888:::::88888888888::::::顶顶88   888    
.......8顶:::::::8888顶:::::888:::::::88:::8888888:::::::顶顶  88    
......88顶:::::::8888顶::::::88:::::::::8:::::888888::::::::顶顶 88    
.....8888顶:::::888顶:::::::::88::::::::::顶::::8888::::::::::::顶 8    
....88888:顶::::888顶::::::::::8:::::::::::顶::::888::::::::::::::顶    
...88.888:顶:::888:顶::::::::::8::::::::::::顶::888::::::::::::::::顶    
...8.88888顶:::88::顶::::::::::::::::::::::::顶:88::::::::::::::::::顶    
.....88888顶:::88::顶:::::::::::::::::::::::::顶88:::::::::::::::::::顶    
.....88888顶:::88::顶:::::::::::::::::::::::::顶:8::::::::::::::::::::顶    
....888888顶::::8::顶::::::::::::::8888::::::::顶8::::::::::::8888:::::顶    
....88888..顶:::8::顶顶:::::::::::888888:::::::顶::::::::::::888888::::顶    
....8888...顶顶:::::顶顶::::::::::888888:::::::顶顶::::::::::888888::::顶    
....8888....顶:::::::顶顶::::::::::8888:::::::顶顶顶::::::::::8888::::顶    
.....888....顶顶::::::顶顶顶:::::::::::::::::顶顶::顶::::::::::::::::顶    
......88.....顶::::::::顶顶顶顶:::::::::::顶顶顶:::顶顶:::::::::::::顶    
.......88....顶顶:::::::::顶顶顶顶顶顶顶顶顶顶:::::::顶顶顶顶顶顶顶顶    
........88....顶顶::::::::::::顶顶顶顶顶顶顶::::::::::::顶顶顶顶顶    
.........88...8顶顶::::::::::::::::::::::::::::::::::::::::顶    
..........8...88顶顶::::::::::::::::::::::顶:::顶::::::::::顶    
..............888顶顶::::::::::::::::::顶顶::::::顶顶::::::顶    
.............88888顶顶:::::::::::::::顶顶顶:::::::顶顶:::::顶    
.............888888顶顶:::::::::::::顶顶顶:::::::::顶顶:::顶    
............88888888顶顶:::::::::::顶顶顶:::::::::::顶:::顶    
...........88.8888888.顶::::::::顶顶顶::::::::::::::顶::顶    
...........8..888888..顶::::::顶顶:::::::::::::::::顶::顶    
..............888888..顶:::::顶:::::::::::::::::::顶::顶顶    
.............888888...顶::::顶::::::::::::::::::::::::顶顶    
.............888888...顶::::顶::::::::::::::::::::::::顶:顶    
.............88888...顶::::::::::::::8::::::::::::::::顶::顶    
............88888...顶:::::::::::::::88::::::::::::::::顶::顶    
...........88888...顶::::::::::::::::8::::::::::::::::::顶::顶    
..........88888...顶:::::顶:::::::::::::::::::::顶::::::::顶::顶    
..........8888...顶:::::顶:::::::::::::::::::::::顶顶::::::顶::顶    
.........8888...顶:::::顶:::::::::::::::::::::::顶顶顶:::::::顶:顶    
........888....顶:::::顶顶::::::::::::::::::::::顶顶顶::::::::顶:顶    
......8888....顶::::::顶顶:::::::::::::::::::::顶顶顶::::::::: 顶:顶    
.....888......顶:::::顶:::::::::::::::::::::::顶顶::::::::::::::顶:顶    
..8888.......顶::::::::::::::::::::::::::::::顶::::::::::::::::::顶:顶    
.............顶::::::::::::::::::::::::::::::::::::::::::::::::::顶:顶    
............顶::::::::顶:::::::::::::::::::::::::::::::::::::::::顶:顶    
............顶::::::::顶:::::::::::::::::顶::::::::::::::::::::::顶:顶    
...........顶::::::::::顶::::::::::::::顶::::::::::::::::::::::::顶:顶    
...........顶:::::::::::顶8::::::::8:顶:::::::::::::::::::::::::顶:顶8    
...........顶::::::::::::88888888888顶:::::::::::::::::::::::::::顶:顶    
...........顶:::::::::::::88888888顶:::::::::::::::::::::::::::顶:顶8    
...........顶::::::::::::::888888顶::::::::::::::::::::::::::::顶:顶    
...........顶:::::::::::::::88888顶:::::::::::::::::::::::::::顶:顶    
...........顶:::::::::::::::::88顶::::::::::::::::::::::::::::顶顶    
...........顶:::::::::::::::::::顶:::::::::::::::::::::::::::顶顶    
...........顶:::::::::::::::::::顶::::::::::::::::::::::::::顶顶    
............顶:::::::::::::::::顶::::::::::::::::::::::::::顶顶    
............顶:::::::::::::::::顶::::::::::::::::::::::::::顶    
.............顶:::::::::::::::顶::::::::::::::::::::::::::顶    
.............顶:::::::::::::::顶:::::::::::::::::::::::::顶    
..............顶:::::::::::::顶:::::::::::::::::::::::::顶    
..............顶:::::::::::::顶:::::::::::::::::::::::顶    
...............顶:::::::::::顶:::::::::::::::::::::::顶    
...............顶:::::::::::顶::::::::::::::::::::::顶    
................顶:::::::::顶::::::::::::::::::::::顶    
................顶:::::::::顶:::::::::::::::::::::顶    
.................顶:::::::顶:::::::::::::::::::::顶    
..................顶::::::顶::::::::::::::::::::顶    
..................顶:::::顶::::::::::::::::::::顶    
...................顶:::顶::::::::::::::::::::顶    
...................顶::顶::::::::::::::::::::顶    
....................顶:顶:::::::::::::::::::顶    
....................顶顶:::::::::::::::::::顶    

#4


说一下你是想传值给后台吗?

这个JS语句是否是动态生成的?

#5


我是想传值给后台的,

#6


比方说单击一个按钮提示让输入密码,然后我要获取用户输入的密码,来做验证啊

#7


可以实现, 你具体想实现的功能是? 可以加QQ 343397317 交流

#8


可以将值存在控件里.例如hidden.cs里读取 控件的值就可以了

#9


Atribut.add("控件","javascript代码");试一下