如何在Javascript HTML中创建创建链接按钮 [英] how to create Create link Button in Javascript HTML

查看:70
本文介绍了如何在Javascript HTML中创建创建链接按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hi Team,

我想在Javascript HTML中创建链接按钮。然后点击链接Buttton我想调用另一种方法是否可能??。我谷歌但没有得到完美答案。



请指导我。



谢谢

Harshal

解决方案

html正文中的链接按钮:

< a href =javascript:method2call()>调用另一种方法< / a> 



和javascript方法:

 <   script     type   =  text / javascript >  
function method2call(){
// todo code
}
< / script >


Hi Team,
I want to Create link Button in Javascript HTML. And after that on click of link Buttton i want to call another Method Is it possible??.I google it but not get the perfect answer.

Please guide Me.

thanks
Harshal

解决方案

The link button in the html body:

<a href="javascript:method2call()" >Call another method</a>


and the javascript method:

<script type="text/javascript">
    function method2call() {
        // todo code
    }
</script>


这篇关于如何在Javascript HTML中创建创建链接按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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