htmld出一个输入框提示用户输入姓名

htmld出一个输入框提示用户输入姓名,第1张

1、首先打开html编辑器,新建一个html文件,例如:index.html。

2、在index.html中的<body>标签中,输入以下html代码:

<input type="text" placeholder="请输入账号" />

<input type="password" placeholder="请输入密码" />

3、浏览器运行index.html页面,此时的输入框有了提示文字“请输入账号”,密码框有了提示文字“请输入密码”。

html中d出框可以用window.open方法

<html>

<head>

<script type="text/javascript">

function open_win() 

{

window.open("需要d框的地址")

}

</script>

</head>

<body>

<input type=button value="Open Window" onclick="open_win()" />

</body>

</html>

定义和用法

open() 方法用于打开一个新的浏览器窗口或查找一个已命名的窗口。


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/6112989.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-03-15
下一篇 2023-03-15

发表评论

登录后才能评论

评论列表(0条)

保存