English 中文(简体)
ASPX
原标题:ASPX onmouseover

我不熟悉牛页,而方案管理员I的工作是把我的贾瓦文大el列入协会的主页。 我想要在那些对图像的 mo弄时开始车轮,然而,我却无法发挥 mo的作用。

伙伴关系司的职能:

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
  If Not IsPostBack Then
    ClientScript.RegisterStartupScript([GetType](), "Javascript", "javascript:itemSize(); ", True)
  End If
End Sub

从现在起,这辆车轮在装页上。

是否可能这样做?

* 《<<><>>注! 我对方案拟定工作非常新,因此,我看不见∗可能是一个简单的问题。

The JavaScript can be found here: Java

问题回答

您可使用以下法典:

在文字标签上设置一个功能如下:

<script type="text/javascript">
    function fun()
    {
        alert( hi );
    }
</script>

然后用tag子使用这一功能:

<img src="#" alt="image not found." onmouseover="fun()" />

页: 1

第3个参数的案文将放入一个javascript块(如您有True>/code>作为你的第4个参数,因此将造成碎片无效。

If you check the HTML source after your postback, you ll probably see something like the following.

<script type="text/javascript">
  javascript:itemSize();
</script>

当你真正想要的是......

<script type="text/javascript">
  itemSize();
</script>

The post is old and the code that runs the carousel is not available, but this can be done directly in the html. You can make the call, preferably in the head of the html. Assuming that the function that executes the carousel is called itemSize, you can try this.

<script type="text/javascript">
    window.onload function () {
        itemSize();
    };
</script>

全方位例子

<!DOCTYPE html>
<html lang="es">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Carrusel Simple</title>
    <style>
        /* Image style (Estilo de la imagen) */
        .mySlides {
            display: none;
        }

        /* Fade effect (Efecto de fade) */
        .fade {
            animation-name: fade;
            animation-duration: 1.5s;
        }

        @keyframes fade {
            from {
                opacity: .4
            }

            to {
                opacity: 1
            }
        }

        /* Navigation dots style (Estilo de los puntos de navegación) */
        .dot {
            height: 15px;
            width: 15px;
            margin: 0 2px;
            background-color: #bbb;
            border-radius: 50%;
            display: inline-block;
            transition: background-color 0.6s ease;
        }

        .active {
            background-color: #717171;
        }
    </style>
    <script type="text/javascript">
        var slideIndex = 0;
        window.onload = function () {
            showSlides();
        };

        function showSlides() {
            var i;
            var slides = document.getElementsByClassName("mySlides");
            var dots = document.getElementsByClassName("dot");
            for (i = 0; i < slides.length; i++) {
                slides[i].style.display = "none";
            }
            slideIndex++;
            if (slideIndex > slides.length) {
                slideIndex = 1
            }
            for (i = 0; i < dots.length; i++) {
                dots[i].className = dots[i].className.replace(" active", "");
            }
            slides[slideIndex - 1].style.display = "block";
            dots[slideIndex - 1].className += " active";
            setTimeout(showSlides, 2000); // Change image every 2 seconds (Cambiar imagen cada 2 segundos)
        }
    </script>
</head>

<body>
    <div class="slideshow-container">
        <div class="mySlides fade">
            <img src="imagen1.jpg" style="width:100%">
        </div>
        <div class="mySlides fade">
            <img src="imagen2.jpg" style="width:100%">
        </div>
        <div class="mySlides fade">
            <img src="imagen3.jpg" style="width:100%">
        </div>
        <!-- Puntos de navegación (Nvigation point.) -->
        <div style="text-align:center">
            <span class="dot"></span>
            <span class="dot"></span>
            <span class="dot"></span>
        </div>
    </div>
</body>

</html>




相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签