zoukankan
html css js c++ java
动态改变input标记类型
<!
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
>
<
html
xmlns
="http://www.w3.org/1999/xhtml"
>
<
head
>
<
meta
http-equiv
="Content-Type"
content
="text/html; charset=utf-8"
/>
<
title
>
无标题文档
</
title
>
<
script
type
="text/javascript"
>
function
ChangeInputType(inputType)
{
var
oldControl
=
document.getElementById(
"
testControl
"
);
var
controlParent
=
oldControl.parentNode;
var
newControl
=
document.createElement(
"
input
"
);
newControl.setAttribute(
"
type
"
,inputType);
controlParent.appendChild(newControl);
controlParent.removeChild(oldControl);
}
</
script
>
</
head
>
<
body
>
<
input
type
="button"
value
="changeType"
onclick
="ChangeInputType('file');"
/>
<
div
>
<
input
type
="text"
id
="testControl"
/>
</
div
>
</
div
>
</
body
>
</
html
>
查看全文
相关阅读:
从内存中加载并启动一个exe
使用Hamcrest增强JUnit的测试能力
Delphi编译指令说明
Delphi 64与32位的差异
获取exe文件窗口抓图,将memo转化为JPG输出
Delphi 的 Utf-8 转换
我的第一个破解软件,试验成功!
Qt之QComboBox(基本应用、代理设置)
常见寄存器以及常见汇编指令,常见爆破指令 good
大神级回答exists与in的区别
原文地址:https://www.cnblogs.com/ywkpl/p/1088639.html
最新文章
TVirtualStringTree的Minimal例子学习
SQL优化
Delphi 完全时尚手册之 Visual Style 篇
WPF-21:WPF实现仿安卓的图案密码键盘(初级)
WndProc漏写override会发生什么情况?
Windows常见窗口样式和控件风格
给MDI窗体加背景,解释MakeObjectInstance和CallWindowProc的用法
Delphi 7里Messages.pas里所有104种重定义消息种类,180种不同的消息名称
Delphi中Message消息的三种使用方法(覆盖WndProc,覆盖消息函数,改写WMCommand)
求逆序数
热门文章
汇编指令速查
Delphi窗体研究,留个爪,以后回来研究
GPL 与 LGPL 扫盲
FormatFloat
Format
cf 323A A. Black-and-White Cube 立体构造 不知道为什么当k为奇数时构造不出来 挺有趣的题目吧
Dephi泛型generic的应用
Delphi的未来,一点浅见
ShowModal 代码分析
Delphi 对话框实现源码分析
Copyright © 2011-2022 走看看