金字塔.html

来自「介绍了javascript的常用的函数」· HTML 代码 · 共 56 行

HTML
56
字号
<html>
<head>
<script language="javascript" type="text/javascript">
function ab(){
var str="☆";
for(var row=0;row<10;row++){
	document.write("<center>");
	for(var col=0;col<row;col++){
	document.write(str);

	}
	document.write("</center>");

}
}

function as(){
var name=prompt("请输入姓名","张三");
document.write("你输入的姓名是: "+name);

}

function am(){
confirm("你真的确定了吗?")
}


</script>
</head>


<body>
<input type="button" value="姓名" onclick="am()"/>
<input type="button" value="图片" onclick="ab()"/>


</body>
</html>

















⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?