iapp怎么弄一个输入框下面放按钮要输入一定内容才可以点击按钮继续执行?

iapp怎么弄一个输入框下面放按钮要输入一定内容才可以点击按钮继续执行?,第1张

html><head><meta charset="utf-8"><title></title><style>.box{width:50%margin-top:10%margin:autopadding:28px height:350pxborder:1px #111 solid display:none /* 默认对话框隐藏 */}.box.show{display:block} .box .x{ font-size:18pxtext-align:rightdisplay:block}.box input{width:80%font-size:18pxmargin-top:18px}</style><script>野悄中 function change(n){document.getElementById('inputbox').style.display=n?'block':'none'/* 点击按钮打开/关闭 对话框 */} </script>运兆 </head><body><div id="div1"><input type="button" onClick="change(1)" value="修改"> <table> <tr> <td width="62"><a href="www.taobao.com" target="_blank">淘宝</a></td> <tr> <td><a href="www.taobao.com" target="_blank">淘宝</a></td> </tr> <tr> <td><a href="www.taobao.com" target="_blank">淘宝</a></td> </tr> </tr> </table></div><div id='inputbox' class="box"> <a class='x' href=''onclick="changereturn false">关闭</a> <p>新名称:</p><input type="text"> <p>新网址:</p><input type="text"颂山> <input type="button" value="确定"></div></body>

1、打开VisualStudio2013依次点击左上角的文件-新建-项目。

2、在d出的新建项目窗口中依次点击:已安装 - 模板- VisualC++ - 改脊袜MFC,再点击MFC应用程序,并输入项目野谨名(也可直接使用默认名称)在此例中我们取名为MyFirstMFC,最后点击确定按钮。

3、在程序中添加一个编辑框和一个按钮,设置按钮ID为IDC_SetText,Caption为“设置编辑框文本”;设置编辑框ID为IDC_EditBox;调整好窗口的大小。

4、双击“设置编辑框文本”按钮,在按钮的处理程序中添加代码:

GetDlgItem(IDC_EditBox)->SetWindowText(_T("我是编辑框的内容"))

5、生成程序,核激启动调试,点击按钮就会设置编辑框中的内容。


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

原文地址: http://www.outofmemory.cn/bake/11995020.html

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

发表评论

登录后才能评论

评论列表(0条)

保存