Microsoft JScript运行时错误:对象不支持属性或方法'lavaLamp' [英] Microsoft JScript runtime error: Object doesn't support property or method 'lavaLamp'

查看:131
本文介绍了Microsoft JScript运行时错误:对象不支持属性或方法'lavaLamp'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的网络表单

This is my web form

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="MenuExample.WebForm1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>

    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>

    <script type="text/javascript" src="~/Scripts/jquery-1.2.3.min.js"></script>
    <script type="text/javascript" src="~/Scripts/jquery.easing.min.js"></script>
    <script type="text/javascript" src="~/Scripts/jquery.lavalamp.min.js"></script>
    <script type="text/javascript">
        $(function () {
            $("#1, #2, #3").lavaLamp({
                fx: "backout",
                speed: 700,
                click: function (event, menuItem) {
                    return false;
                }
            });
        });
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <h3>With Image</h3>
<ul class="lavaLampWithImage" id="1">
    <li class="current"><a href="#">Home</a></li>
    <li><a href="#">Plant a tree</a></li>
    <li><a href="#">Travel</a></li>
    <li><a href="#">Ride an elephant</a></li>
</ul>



<h3>No Image</h3>
<ul class="lavaLampNoImage" id="2">
    <li class="current"><a href="#">Home</a></li>
    <li><a href="#">Plant a tree</a></li>
    <li><a href="#">Travel</a></li>
    <li><a href="#">Ride an elephant</a></li>
</ul>



<h3>Bottom Style</h3>
<ul class="lavaLampBottomStyle" id="3">
    <li class="current"><a href="#">Home</a></li>
    <li><a href="#">Plant a tree</a></li>
    <li><a href="#">Travel</a></li>
    <li><a href="#">Ride an elephant</a></li>
</ul>

    </div>
    </form>
</body>
</html>




CSS文件




CSS file

.lavaLampWithImage {
    position: relative;
    height: 29px;
    width: 421px;
    background: url("bg.gif") no-repeat top;
    padding: 15px;
    margin: 10px 0;
    overflow: hidden;
}
        .lavaLampWithImage li {
            float: left;
            list-style: none;
        }
            .lavaLampWithImage li.back {
                background: url("lava.gif") no-repeat right -30px;
                width: 9px; height: 30px;
                z-index: 8;
                position: absolute;
            }
                .lavaLampWithImage li.back .left {
                    background: url("lava.gif") no-repeat top left;
                    height: 30px;
                    margin-right: 9px; /* 7px is the width of the rounded shape */
                }
            .lavaLampWithImage li a {
                font: bold 14px arial;
                text-decoration: none;
                color: #fff;
                outline: none;
                text-align: center;
                top: 7px;
                text-transform: uppercase;
                letter-spacing: 0;
                z-index: 10;
                display: block;
                float: left;
                height: 30px;
                position: relative;
                overflow: hidden;
                margin: auto 10px;
            }
                .lavaLampWithImage li a:hover, .lavaLampWithImage li a:active, .lavaLampWithImage li a:visited {
                    border: none;
                }

.lavaLampNoImage {
    position: relative;
    height: 29px;
    width: 421px;
    background-color: white;
    padding: 15px;
    margin: 10px 0;
    overflow: hidden;
    border: 1px solid gray;
}
        .lavaLampNoImage li {
            float: left;
            list-style: none;
        }
            .lavaLampNoImage li.back {
                border: 1px solid #000;
                background-color: #e6e8ea;
                width: 9px;
                height: 30px;
                z-index: 8;
                position: absolute;
            }
            .lavaLampNoImage li a {
                font: bold 14px arial;
                text-decoration: none;
                color: #000;
                outline: none;
                text-align: center;
                top: 7px;
                text-transform: uppercase;
                letter-spacing: 0;
                z-index: 10;
                display: block;
                float: left;
                height: 30px;
                position: relative;
                overflow: hidden;
                margin: auto 10px;
            }
                .lavaLampNoImage li a:hover, .lavaLampNoImage li a:active, .lavaLampNoImage li a:visited {
                    border: none;
                }

.lavaLampBottomStyle {
    position: relative;
    height: 29px;
    width: 421px;
    background-color: white;
    padding: 15px;
    margin: 10px 0;
    overflow: hidden;
    border: 1px solid gray;
}
        .lavaLampBottomStyle li {
            float: left;
            list-style: none;
        }
            .lavaLampBottomStyle li.back {
                border-bottom: 5px solid blue;
                width: 9px;
                height: 30px;
                z-index: 8;
                position: absolute;
            }
            .lavaLampBottomStyle li a {
                font: bold 14px arial;
                text-decoration: none;
                color: #000;
                outline: none;
                text-align: center;
                top: 7px;
                text-transform: uppercase;
                letter-spacing: 0;
                z-index: 10;
                display: block;
                float: left;
                height: 30px;
                position: relative;
                overflow: hidden;
                margin: auto 10px;
            }
                .lavaLampBottomStyle li a:hover, .lavaLampBottomStyle li a:active, .lavaLampBottomStyle li a:visited {
                    border: none;
                }

推荐答案

( function (){


(" ).lavaLamp({ fx:" , 速度: 700 , 点击:功能(事件,menuItem){ 返回 ; } }); }); < / 脚本 > < /head > < 正文 > < 表单 =" form1" runat >服务器" > < div > < h3 > 含图片< /h3 > < ul =" lavaLampWithImage" id 1" > < li =" 当前" < href =" > 主页< /a > < /li > < li > < a =" #" > ; 种一棵树< /a > < /li > < li > < a =" #" > ; Travel < /a > < /li > < li > < a =" #" > ; 骑大象< /a > < /li > < /ul > < h3 > 无图像< /h3 > < ul =" lavaLampNoImage" id 2" > < li =" 当前" < href =" > 主页< /a > < /li > < li > < a =" #" > ; 种一棵树< /a > < /li > < li > < a =" #" > ; Travel < /a > < /li > < li > < a =" #" > ; 骑大象< /a > < /li > < /ul > < h3 > 底部样式< /h3 > < ul =" lavaLampBottomStyle" id 3" > < li =" 当前" < href =" > 主页< /a > < /li > < li > < a =" #" > ; 种一棵树< /a > < /li > < li > < a =" #" > ;Travel</a> </li> <li><a href="#">Ride an elephant</a></li> < /ul > < /div > < /form > < /body > < /html >
("#1, #2, #3").lavaLamp({ fx: "backout", speed: 700, click: function (event, menuItem) { return false; } }); }); </script> </head> <body> <form id="form1" runat="server"> <div> <h3>With Image</h3> <ul class="lavaLampWithImage" id="1"> <li class="current"><a href="#">Home</a></li> <li><a href="#">Plant a tree</a></li> <li><a href="#">Travel</a></li> <li><a href="#">Ride an elephant</a></li> </ul> <h3>No Image</h3> <ul class="lavaLampNoImage" id="2"> <li class="current"><a href="#">Home</a></li> <li><a href="#">Plant a tree</a></li> <li><a href="#">Travel</a></li> <li><a href="#">Ride an elephant</a></li> </ul> <h3>Bottom Style</h3> <ul class="lavaLampBottomStyle" id="3"> <li class="current"><a href="#">Home</a></li> <li><a href="#">Plant a tree</a></li> <li><a href="#">Travel</a></li> <li><a href="#">Ride an elephant</a></li> </ul> </div> </form> </body> </html>




CSS文件




CSS file

.lavaLampWithImage {
    position: relative;
    height: 29px;
    width: 421px;
    background: url("bg.gif") no-repeat top;
    padding: 15px;
    margin: 10px 0;
    overflow: hidden;
}
        .lavaLampWithImage li {
            float: left;
            list-style: none;
        }
            .lavaLampWithImage li.back {
                background: url("lava.gif") no-repeat right -30px;
                width: 9px; height: 30px;
                z-index: 8;
                position: absolute;
            }
                .lavaLampWithImage li.back .left {
                    background: url("lava.gif") no-repeat top left;
                    height: 30px;
                    margin-right: 9px; /* 7px is the width of the rounded shape */
                }
            .lavaLampWithImage li a {
                font: bold 14px arial;
                text-decoration: none;
                color: #fff;
                outline: none;
                text-align: center;
                top: 7px;
                text-transform: uppercase;
                letter-spacing: 0;
                z-index: 10;
                display: block;
                float: left;
                height: 30px;
                position: relative;
                overflow: hidden;
                margin: auto 10px;
            }
                .lavaLampWithImage li a:hover, .lavaLampWithImage li a:active, .lavaLampWithImage li a:visited {
                    border: none;
                }

.lavaLampNoImage {
    position: relative;
    height: 29px;
    width: 421px;
    background-color: white;
    padding: 15px;
    margin: 10px 0;
    overflow: hidden;
    border: 1px solid gray;
}
        .lavaLampNoImage li {
            float: left;
            list-style: none;
        }
            .lavaLampNoImage li.back {
                border: 1px solid #000;
                background-color: #e6e8ea;
                width: 9px;
                height: 30px;
                z-index: 8;
                position: absolute;
            }
            .lavaLampNoImage li a {
                font: bold 14px arial;
                text-decoration: none;
                color: #000;
                outline: none;
                text-align: center;
                top: 7px;
                text-transform: uppercase;
                letter-spacing: 0;
                z-index: 10;
                display: block;
                float: left;
                height: 30px;
                position: relative;
                overflow: hidden;
                margin: auto 10px;
            }
                .lavaLampNoImage li a:hover, .lavaLampNoImage li a:active, .lavaLampNoImage li a:visited {
                    border: none;
                }

.lavaLampBottomStyle {
    position: relative;
    height: 29px;
    width: 421px;
    background-color: white;
    padding: 15px;
    margin: 10px 0;
    overflow: hidden;
    border: 1px solid gray;
}
        .lavaLampBottomStyle li {
            float: left;
            list-style: none;
        }
            .lavaLampBottomStyle li.back {
                border-bottom: 5px solid blue;
                width: 9px;
                height: 30px;
                z-index: 8;
                position: absolute;
            }
            .lavaLampBottomStyle li a {
                font: bold 14px arial;
                text-decoration: none;
                color: #000;
                outline: none;
                text-align: center;
                top: 7px;
                text-transform: uppercase;
                letter-spacing: 0;
                z-index: 10;
                display: block;
                float: left;
                height: 30px;
                position: relative;
                overflow: hidden;
                margin: auto 10px;
            }
                .lavaLampBottomStyle li a:hover, .lavaLampBottomStyle li a:active, .lavaLampBottomStyle li a:visited {
                    border: none;
                }


In your page, add a reference to jquery -
In your page, add a reference to jquery -


这篇关于Microsoft JScript运行时错误:对象不支持属性或方法'lavaLamp'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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