模拟点击按钮class =? [英] Simulating click on button class= ?

查看:83
本文介绍了模拟点击按钮class =?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要模拟单击此按钮,您能帮我吗?

I need simulate a click on this button, can you help me?

<a class="cuba" onclick="showWindow('register', this.href)" href="member.php?mod=register">Register</a>

推荐答案

此处的"class"属性与点击处理程序无关;它指向CSS(样式表)类名称.整个问题似乎与VB无关(在某种意义上可以暗示"VB10",原则上可以是VBScript),而不是Javascript.也没有ASP.NET的迹象.

我感到您对于Web开发中客户端和服务器端的角色以及所涉及的技术感到困惑.

—SA
The attribute "class" here has nothing to do with click handlers; it points to the CSS (style sheet) class name. The whole question seemingly has nothing to do with VB (in the sense on can imply by "VB10", it could be VBScript, in principle), rather to Javascript. There is no indication of ASP.NET as well.

I have a feeling that you are confusing about roles of client and server sides in Web development and the technologies involved.

—SA


您显示的代码段运行一个名为showWindow()的Javascript函数.

我会仔细阅读客户端和服务器端代码之间的区别,这将向您展示每种语言使用的是什么语言.
The piece of code that you have shown runs a Javascript function called showWindow().

I would read up on the differences between client side and server side code, this will show you what languages are used on each.


<a class="cuba" id="myButton" onclick="showWindow('register', this.href)" href="member.php?mod=register">Register</a>

<script language="Javascript">
// Trigger the onclick event from client side code.
var elm = document.getElementById("myButton");
if (typeof elm.onclick == "function") {
    elm.onclick.apply(elm);
}
</script>


这篇关于模拟点击按钮class =?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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