C#:如何准确地鼠标点击html标签" Like" [英] C# : How to get exactly mouse click to html tag "Like "

查看:44
本文介绍了C#:如何准确地鼠标点击html标签" Like"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,每个人

我有问题:我想点击获取html标签的按钮:

Hi, everybody
I have problem: i want to click button that get html tag:

<span class="yt-uix-button-content">Like </span>

,但我不能成功。请帮我!谢谢!

, but i can't do success. Please help me! Thanks!

推荐答案

这是代码,请试试这个..



Here is the code, please try this..

<html>
<head runat="server">
    <script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>
    <script type="text/javascript" language="javascript">
        function ajaxLikeCall() {
            alert('Thanks for your Like !!!');
            /* Write your code of operation that you need*/
        }


()。ready
(function(){
().ready (function () {


('#myLike')。click(ajaxLikeCall);
})
< / script >
< / head >
< 正文 >
< < span class =code-leadattribute> form id = form1 runat = server >
< div >
< span id = myLike class = yt-uix-button-content > < / span > $一样b $ b < / div >
< / form >
< / body >
< / html >
('#myLike').click(ajaxLikeCall); }) </script> </head> <body> <form id="form1" runat="server"> <div> <span id="myLike" class="yt-uix-button-content">Like </span> </div> </form> </body> </html>





谢谢!



Thanks!


这篇关于C#:如何准确地鼠标点击html标签&quot; Like&quot;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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