📄 11-8.htm
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<script language="javascript">
function echo(form,textfiled){
if(textfiled.name == "first"){
form.second.value = form.first.value;
}else {
form.first.value = form.second.value;
}
}
function display(form){
var str = form.first.value+"\n";
str += form.first.name+"\n";
str += form.first.type+"\n";
str += form.first.size;
alert(str);
}
</script>
</head>
<body>
<form name="form">
first <input name="first" value="first" onChange="echo(this.form,this.form.first)" ><br>
second<input name="second" value="second" onChange="echo(this.form,this.name)"><br>
<input type="button" name="button" value="显示第一个文本与地属性" onClick="display(window.document.form)" >
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -