Javascript调用功能帮助

Javascript调用功能帮助

本文介绍了Javascript调用功能帮助???的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

直接调用JavaScript函数(如onclick ="a()")和onclick ="JavaScript:a()"(其中a()是用JavaScript编写的函数)有什么区别?

What is the difference between calling a JavaScript function directly like onclick = "a()" and onclick="JavaScript:a()" where a() is a function written in JavaScript?

推荐答案

onclick = "a()"


这是在以* .ASPX或* .ASCX之类的设计器表单页面编写时(即在客户端编写时)完成的.
类似的方法可用于通过脚本语言(例如Javascript或类似语言)来定义点击.



This is done while writing in designer form page like *.ASPX or *.ASCX, i.e. while writing in client side.
Similar approach can be used for defining click via script language like in Javascript or so.


onclick="JavaScript:a()"


这是在编写代码隐藏文件时完成的.他们驻留在服务器上,需要知道方法a()的执行是在客户端执行的,并且是在脚本中定义的.


This is done while writing in code-behind files. They reside on server and needs to know that the execution of method a() is client side and defined in scripts.


这篇关于Javascript调用功能帮助???的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-18 12:06