The void operator is used in either of the following ways:
1. javascript:void (expression)2. javascript:void expression
The void operator specifies an expression to be evaluated without returning a value. expression is a JavaScript expression to evaluate. The parentheses surrounding the expression are optional, but it is good style to use them.
Implemented in
Navigator 3.0
You can use the void operator to specify an expression as a hypertext link. The expression is evaluated but is not loaded in place of the current document.
The following code creates a hypertext link that does nothing when the user clicks it. When the user clicks the link, void(0) evaluates to 0, but that has no effect in JavaScript.
<A HREF="javascript:void(0)">Click here to do nothing</A>
The following code creates a hypertext link that submits a form when the user clicks it.
<A HREF="javascript:void(document.form.submit())">Click here to submit</A>
分享到:
相关推荐
Junit通常用于那些有明确返回值的方法的测试,而无法对返回值是void类型的方法进行测试,因为Junit的assert断言方法只适用于预期值与实际值的比较,对于void类型的方法,我们无法从它的return语句获得具体的返回值。...
void指针void指针void指针void指针void指针
托盘,右键演示,C#源代码private void Form1_Load(object sender, EventArgs e) {//设置托盘控件属性 this.notifyIcon1.ContextMenuStrip = this.contextMenuStrip1; this.notifyIcon1.Text = "演示创建托盘"; ...
Junit 通常用于那些有明确返回值的方法的测试,而无法对返回值是void类型的方法进行测试,因为Junit的assert断言方法只适用于预期值与实际值的比 较,对于void类型的方法,我们无法从它的return语句获得具体的返回值...
解决error LNK2005 void __cdecl operator delete(void
void及void指针含义的深刻解析,C/c++中void的使用方法。
void及void指针(C,C++)
C语言void及void指针深层探索.doc
dock的应用,控制工具条在窗体中的位置,C#源代码private void toolStripButton1_Click(object sender, EventArgs e) { //靠上 this.toolStrip1.Dock = DockStyle.Top; } private void toolStripButton2_Click...
public void actionPerformed(ActionEvent e){ if(e.getSource()==登录){ String name=用户名.getText().toString(); String u=null,pwd=null,auth=null; String url="jdbc:odbc:mysql"; ...
编写函数void fun(char *s,char *t,char *p)将未在字符串s中出现、而在字符串t中出现的字符, 形成一个新的字符串放在p中,p中字符按原字符串中字符顺序排列,但去掉重复字符。 例如: 当s为"12345", t为"8624677"时, p...
许多初学者对C/C++诧言中的void及void指针类型丌甚理解,因此在使用上出现了一些错诨。本文将对void关键字的深刻含义迚行解说,并详述void及void指针类型的使用方法不技巧。
com interrupt void interrupt 4 using 3
在c++中int main()和int main(void)是等效的,但在c中让括号空着代表编译器对是否接受参数保持沉默。在c语言中main()省略返回类型也就相当说明返回类型为int型,不过这种用法在c++中逐渐被淘汰。虽然Void main...
小小的void蕴藏着很丰富的设计哲学,作为一名程序设计人员,对问题进行深一个层次的思考必然使我们受益匪浅。
许多初学者对C/C++语言中的void及void指针类型不甚理解,因此在使用上出现了一些错误。本文将对void关键字的深刻含义进行解说,并详述void及void指针类型的使用方法与技巧。
void的含义void即“无类型”,void *则为“无类型指针”,可以指向任何数据类型。 void指针使用规范①void指针可以指向任意类型的数据,亦即可用任意数据类型的指针对void指针赋值。例如:int *pint;void *pvoid;...
javascript:void(0);
只有了解了地址,你才了解计算机。 只有了解了void指针,你才真正了解了
C语言程序设计-请编一个函数void fun(int tt[M][N],int pp[N]),tt指向一个M行N列的二维数组,求出二维数组每列中最大元素,并依次放入pp所指一维数组中;二维数组中的数已在主函数中赋予;.c