首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > ASP >

各位帮忙,马上结分.window.open 的有关问题

2012-02-11 
各位帮忙,在线等,马上结分.window.open 的问题.functionusernamecheck(){varnamenamedocument.userform.

各位帮忙,在线等,马上结分.window.open 的问题.
function   usernamecheck(){
var   name;
name=document.userform.user_name.value;
if   (name== ' '){
window.alert( '用户名不能为空! ');
document.userform.user_name.focus();
return   false;
}
else{
                          window.open( 'b.asp?username=name ', ' ', 'width=200,height=200 ');
}
}

这样为什么不行呢?这是一个按钮的点击事件,我该如何写.谢了...

[解决办法]
window.open( "b.asp?username= "+name, ' ', 'width=200,height=200 ')
[解决办法]
window.open( 'b.asp?username= '+name, ' ', 'width=200,height=200 ')
[解决办法]
加个 "; "

热点排行