模仿软键盘(参考代码)

2012/7/22 21:11:491145 阅读

    caozuo.htm:
    <html>
    <head>
    <meta http-equiv=”Content-Type” content=”text/html; charset=gb2312″>
    <title>keyboard</title>
    <style>
    td{border:1px solid black;width:35px;text-align:center;color:white;font-weight:bold;background:black;}
    </style>
    <script language=javascript src=”daima.asp”></script>
    </head>
    <body>
    <input id=”ttt” onfocus=”tt1.style.display=”” >
    </body>
    </html>
    
    
    daima.asp:
    
    document.write(“<table id=tt1 style=’position:absolute;top:40px;left:10px;display:none’ onmouseover=tt1.style.display=” onmouseout=tt1.style.display=’none’>”);
    
    document.write(“<tr>”);
    document.write(“<td onclick=ttt.value+=this.innerText>1</td>”);
    document.write(“<td onclick=ttt.value+=this.innerText>2</td>”);
    document.write(“<td onclick=ttt.value+=this.innerText>3</td>”);
    document.write(“<td onclick=tt1.style.display=’none’;tt2.style.display=”>→</td>”);
    document.write(“</tr>”);
    document.write(“</table>”);
    document.write(“<table id=tt2 style=’position:absolute;top:40px;left:10px;display:none’ onmouseover=tt2.style.display=” onmouseout=tt2.style.display=’none’>”);
    document.write(“<tr>”);
    document.write(“<td onclick=ttt.value+=this.innerText>a</td>”);
    document.write(“<td onclick=ttt.value+=this.innerText>b</td>”);
    document.write(“<td onclick=ttt.value+=this.innerText>c</td>”);
    document.write(“<td onclick=tt2.style.display=’none’;tt1.style.display=”>←</td>”);
    document.write(“</tr>”);
    document.write(“</table>”);

    下一条:文本框调用

    上一条:asp时间加减运算 和转换问题

枣庄西桥网络微信小程序微信小程序

枣庄西桥网络手机站二维码扫描手机浏览