社区
JavaScript
帖子详情
如何改变type属性
lljllj2000
2002-04-04 08:54:25
如何用button改变一个 type="hidden"的input为 type="button"?
<INPUT name="cancle" type="hidden" value="111">
<INPUT name="ok" onclick="ok_action()" type="button" value="確定">
...全文
90
5
打赏
收藏
如何改变type属性
如何用button改变一个 type="hidden"的input为 type="button"?
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
5 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
Reve
2002-04-04
打赏
举报
回复
cancle.outerHTML='<INPUT name="cancle" type="button" value="111">';
karma
2002-04-04
打赏
举报
回复
According to MSDN documentation:
As of Microsoft® Internet Explorer 5, the type property is read/write-once, but only when an input element is created with the createElement method and before it is added to the document.
weidegong
2002-04-04
打赏
举报
回复
Perhaps,you can use it in this way:
<form name=mxh1>
<input id=mxh style="visibility:hidden">
<input name=aa type=radio onclick="document.all.mxh.style.visibility='visible'">显示
<input name=aa type=radio onclick="document.all.mxh.style.visibility='hidden'">隐藏
</form>
<script>
for(var i=0;i<document.mxh1.elements.length;i++)
{
if(document.mxh1.elements[i].type=="radio")
document.mxh1.elements[i].checked=""
}
</script>
BrentIvan
2002-04-04
打赏
举报
回复
<script language="JavaScript">
function changeType() {
document.all.oDiv.innerHTML = "<input type=\"button\" name=\"oInput\" id=\"oInput\">";
}
</script>
<div name="oDiv" id="oDiv"><input type="hidden" name="oInput" id="oInput" value="1"></div>
<input type="button" value="click me" onclick="changeType()">
孟子E章
2002-04-04
打赏
举报
回复
不可以修改:
可以这样
<form>
<INPUT name="cancle" type="button" value="111" style="display:none">
<INPUT name="ok" onclick="cancle.style.display='block'" type="button" value="確定">
</form>
jquerymobile设计完整例子
`data-theme`
属性
可以应用于任何元素,
改变
其背景色、边框和文本颜色。此外,还可以通过修改主题CSS文件进行更深度的定制。 6. **响应式布局** 为了适应不同屏幕尺寸的设备,jQuery Mobile 实现了自动响应式布局。...
前端CSS input
type
属性
详解
input在前端中使我们需要熟悉使用的一个标签,input中
type
属性
值不止text一个。 可定义单行输入字段,用户可以自定义输入文字,默认最多输入20个。placeholder为文本框初始默认的文字效果图: value是按钮中的...
jQuery/Js动态修改Input的
Type
属性
试图修改 Input
属性
,如 $(this).attr('
type
','password'); 或 ...jQuery无法修改 Input 的
Type
属性
,因为源码中: // We can't allow the
type
property to be changed (since itcauses ...
【input 标签的
type
属性
详解】
input 输入标签的
type
属性
1.1 input 标签的
type
类型
属性
的常用
属性
值⑴
type
="text"⑵
type
="button"⑶
type
="checkbox"⑷
type
="file"⑸
type
="hidden"⑹
type
="image"⑺
type
="password"⑻
type
="radio"⑼ ...
input标签的
type
属性
汇总
input
type
=“text”/> 单行文本输入框常用来输入简短的信息,如用户名、账号等,常用的
属性
有name、value、 maxlength。 2.密码输入框< input
type
=" password"/> 密码输入框用来输入密码,其内容将以...
JavaScript
87,996
社区成员
224,693
社区内容
发帖
与我相关
我的任务
JavaScript
Web 开发 JavaScript
复制链接
扫一扫
分享
社区描述
Web 开发 JavaScript
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章