日期:2014-05-17  浏览次数:20586 次

html按钮对话框的使用和javascript:应用

<script type="text/javascript">
function okclick(){
var yesno=confirm("确定跳转到http://www.baidu.com吗?");
if(yesno!="0"){//no=0 yes!=0
?? document.baidu.action="http://www.baidu.com";
?? document.baidu.submit();
}else{
?? document.baidu.submit();
}

}
</script>
<form name="baidu" action="" method="post">
<input type="button" value="提交" onclick="okclick()" ></input>
</form>

?

<input type="button" value="弹出对话框" onclick="javascript:alert('sss');"/>

?

<input type="button" value="弹出对话框" onclick="javascript:window.showModalDialog('http://www.baidu.com','newwin','dialogHeight: 200px; dialogWidth: 150px; dialogTop: 458px; dialogLeft: 166px; edge: Raised; center: Yes; help: Yes; resizable: Yes; status: Yes;');"/>

?

<a?? href= 'Delete.action'?? onclick="return(confirm( '您将删除当前选中行的纪录,是否继续?'))">删除</a>

?