<script language="javascript" type="text/javascript">
if(confirm("想知道现在的时间吗?")){
display_time()
}
function display_time(){
var now = new Date()
var hours = now.getHours()
var minutes = now.getMinutes()
var seconds = now.getSeconds()
var current_time = hours + ":" + minutes + ":" + seconds
alert("现在的时间是" + ":" + current_time)
}
</script>
===========================================
略微不理的就是confirm,这到底是什么东西呢?```难道是和alert一样的东西,估计是
在flash的字典里查不到它
if(confirm("想知道现在的时间吗?")){
display_time()
}
function display_time(){
var now = new Date()
var hours = now.getHours()
var minutes = now.getMinutes()
var seconds = now.getSeconds()
var current_time = hours + ":" + minutes + ":" + seconds
alert("现在的时间是" + ":" + current_time)
}
</script>
===========================================
略微不理的就是confirm,这到底是什么东西呢?```难道是和alert一样的东西,估计是
在flash的字典里查不到它
回复Comments
作者:
{commentrecontent}