在javascript(MVC2.0 / MVC3)中启用/禁用图像onclick鼠标 [英] enable / disable table on image onclick of mouse in javascript(MVC2.0/MVC3)

查看:67
本文介绍了在javascript(MVC2.0 / MVC3)中启用/禁用图像onclick鼠标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我正在寻找启用/禁用图像表格的代码。首先,当我们运行第一个程序时,只显示背景图像,点击图像后应该出现一个表(如用户名(txt& lbl)和密码(txt& lbl),两个按钮清除登录),如果我们再次点击图片,它就会消失。我做了一些编码,但是当我们运行第一个时它会显示图像。我对这个javascript和mvc完全不熟悉我请求帮助我...



Hi,

I am looking for code to Enable / Disable table from a image. At first only back ground image should display when we run program for the first, after clicking on image a table should appear(like username(txt & lbl) and password(txt & lbl) with two buttons clear login), if we click on image again it shod disappear. I have done some coding, but it display with image when we run for the first. I am totally new to this javascript and mvc I kindly request to help me out...

<html xmlns="http://www.w3.org/1999/xhtml" >
<head  runat="server">
<title>FillTest</title>
<script type="text/javascript" src="../../Scripts/jquery-1.4.1.js"></script>
<script type="text/javascript">
//   $('#divTable').hide();
//   $('#tblTable').hide();

window.onload = h();
     
function hd() {
    if ($('#tblTest').hide() == false) {
        function disableTable() {
            $('#tblTest').hide();
        }
    }
    else {
        function enableTable() {
            $('#tblTest').show();
        }
    }
}
</script>
</head>
<body  önclick="hd();" style="height: 735px" background="../../Content/Image/untitled.bmp" style="height: 605px">
    <div>
        <form action="" accept="post"  önload="hd();" style="margin-left: 2px; width: 975px; margin-right: 0px; height: 4px; margin-bottom: 0px;">
             <br />
            <div id="divTable" önclick="hd();" style="width: 363px; height: 188px;">
    <script type="text/javascript">
    window.onload = $('#tblTest').hide();
    $('#tblTble').focus() = false;
    </script>
                <table id="tblTest" style="width: 97%; left=315; height: 152px; table-layout: auto; border-collapse: separate; 131px: ;" bgcolor="#DCFCF2" >
                    <tr class="style3">
                        <td bgcolor="Black" önclick="h();">
                            Login Here:
                            <input type="button"  önclick="h();" value="X" style="height: 22px; width: 21px;" align="top" />
                        </td>
                    </tr>
                    <tr class="style3">
                        <td class="style4">
                            Username: <input type="text" name="uid"  önclick="d();" />
                        </td>
                    </tr>
                    <tr class="style3">
                        <td class="style4" bgcolor="#DFFFFF">
                            Password: <input type="text"  önclick="d();" name="pwd" />
                        </td>
                    </tr>
                    <tr class="style3">
                        <td class="style6" bgcolor="#DFFFFF"> 
                            <input id="Submit1"  önclick="d();" type="submit" value="Login" />
                            <input id="Submit2"  önclick="d();" type="submit" value="Clear" />
                        </td>
                    </tr>
                </table>
            </div>
        </form>
        <form action="" method="post" style="margin-left: 2px; width: 1041px; margin-right: 205px; height: 734px; margin-top: 0px;">
            <input type="image" src="../../Content/Image/untitled.bmp" onclick="hd();"  önload="h();d();" style="height: 737px; margin-left: 0px; width: 1044px;" />
        </form>
    </div>
</body>
</html>





谢谢....



Thank you....

推荐答案

('#divTable')。hide();
//
('#divTable').hide(); //


('#tblTable')。hide();

window .onload = h();

function hd(){
if
('#tblTable').hide(); window.onload = h(); function hd() { if (


' #tblTest')。hide()== false ){
function disableTable(){
('#tblTest').hide() == false) { function disableTable() {


这篇关于在javascript(MVC2.0 / MVC3)中启用/禁用图像onclick鼠标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆