⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 zh25.htm

📁 javascript各种效果的实例及源代码
💻 HTM
字号:
 <html>
<head>
<title>输入框的新属性</title>
<style type="text/css">
<!--
body {  font-family: "宋体"; font-size: 9pt; margin-top: 0px; margin-left: 0px; margin-right: 0px}
A { COLOR: black; FONT-SIZE: 9pt; FONT-WEIGHT: 400; TEXT-DECORATION: none }
 A:hover { COLOR: red; FONT-SIZE: 9pt; FONT-WEIGHT: 400; TEXT-DECORATION: underline }
a:active     { font: 9pt "宋体"; cursor: hand; color: #FF0033 }

-->
</style>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>

<body bgcolor="#fef4d9">
<br>
<br>
<center>
  <font color=red face="隶书" size=6>输入框的新属性<font size="5"></font></font> 
</center>
<br>
<center>
<table border=5 bordercolor=blue borderlight=green>
<tr>
      <td align=center width=450 height=194> 
      <table width="100%" border="1" cellspacing="1" cellpadding="1"height="100%">
                <tr valign="top"> 
          <td><!-- #BeginEditable "main" -->
            <p>使用两种新的属性disabled和readonly:</p>
            <p>(1)disabled属性可以将一种操作屏蔽起来,例如禁止用户选择,点击按钮或者使用TAB键在不同的TEXT间切换。</p>
            <p>在FORM标签中使用Disabled属性:</p>
            <p><font size="3" color="#FF0000"><b>&lt;INPUT type=&quot;button&quot; 
              name=&quot;doneButton&quot; value=&quot;确定&quot; disabled&gt;</b></font></p>
            <p> 看上去就是这样: 
              <input type="button" name="doneButton"
 value="确定" disabled>
              。</p>
            <p><font color="#FF0000" size="3"><b>&lt;INPUT type=&quot;text&quot; 
              name=&quot;username&quot; value=&quot;james&quot; disabled&gt;</b></font></p>
            <p> 看上去就是这样: 
              <input type="text" name="username2" value="xiaoqing" disabled>
            </p>
            <p>当你的站点有些功能功能尚未完成或者暂时关闭,就这样处理不是非常棒吗?</p>
            <p>注意:使用disabled属性后的区域的值,不能被传递给其他的程序(ASP/CGI)去处理,如果你非要传递请通过隐藏属性去做。即&lt;input 
              type=&quot;hidden&quot; name=&quot;username&quot; value=&quot;james&quot;&gt;</p>
            <p>(2)readonly属性顾名思义是“只读”。它将TEXT转化为一个对象,禁止对它进行编辑。</p>
            <p>&lt;INPUT type=&quot;text&quot; name=&quot;partNumber&quot; value=&quot;1500&quot; 
              readonly&gt;</p>
            <p> 
              <input type="text" name="username" value="xiaoqing">
              可以修改<br>
              <input type="text" name="partNumber"
 value="2000" readonly>
              不能修改</p>
            <p>以上第二个区域使用了readonly属性, 你虽然可以通过TAB键在多个TEXT区域间切换,但是不能修改已经指定的TEXT区的值。但是它不象Disabled属性那样,可以进行正常的数值传递。</p>
            <!-- #EndEditable --></td>
        </tr>
      </table>

 </td>
    </tr>
</table></center>

<center>
<SCRIPT LANGUAGE="JavaScript">

<!-- hide

function goHist(a) 

{

   history.go(a);

}

//-->

</script>

<FORM METHOD="post">
<INPUT TYPE="button" VALUE="返回" onClick="goHist(-1)" style="background-color: #8000FF; color: rgb(255,255,255)">
</form>
</center>
<br>
<br>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -