技术文章
首页
关于我们
网站模板
客户案例
网站建设
程序开发
联系我们
技术文章
seo
asp.net
JavaSript
asp
网站建设
js常见表单应用技巧
时间:2008-01-09 点击:80
显示框架内的指定位置
<div style='width:300px;height:300px;'><iframe src='http://163.com' style='margin:-100px;width:100%;height:100%'></iframe></div>
改变文本框的属性(确定按钮)
<form id="form1" name="form1" method="post" action="">
<input name="text" type="text" value="sdafasdfasdf" id="name"/>
<input type="button" name="Submit" value="更改" onClick="tot()"/>
</form>
<SCRIPT LANGUAGE="JavaScript">
<!--
function tot()
{
if (document.form1.name.disabled == true)
{
document.all.name.disabled=false;
}
else
{
document.all.name.disabled=true;
}
}
//-->
</SCRIPT>
注:以下的readOnly的O必须为大写r必须为小写
<SCRIPT LANGUAGE="JavaScript">
<!--
function tot()
{
if (document.all.name.readOnly == true)
{
document.all.name.readOnly=false;
}
else
{
document.all.name.readOnly=true;
}
}
//-->
</SCRIPT>
改变文本框的属性(单选按钮)
<script language="javascript">
<!--
function cStyleshow()
{
document.all.name.disabled=false;
}
function cStylehidde()
{
document.all.name.disabled=true;
}
-->
</script>
<input name='a1' type='radio' value='yes' checked onclick='cStyleshow()'>1
<input name='a1' type='radio' value='no' checked onclick='cStylehidde()'>2
<input name="name" type="text" id="name">
改变文本框的属性(下拉列表)
<select name="s1" onChange="if(this.value==1){document.all('T1').readOnly=true}else{document.all('T1').readOnly=false}">
<option value="1">1</option>
<option value="2">2</option>
</select>
<input type="text" name="T1"/>
javascript flash下fromCharCode和charCodeAt方法使用说明
用javascript实现检测指定目录是否存在的方法
原创
解读IE和firefox下JScript和HREF的执行顺序
img的onload的另类用法
javascript 点击整页变灰的效果(可做退出效果)。
> 返回
地址:上海市普陀区胶州路941号长久商务中心 电话: QQ:
© Copyright 2012 上海网络
Product
All Rights Reserved