face.js 以下window.onload=function(){
var faceimg=document.getElementByld('faceimg');
faceimg.onclick=function(){
window.open('face.php','face','width=400,height=400,top=0,left=0,scrollbars=1');
}
};
这段点击图片出新窗口的代码对否?
为什么我总是无效呢?
<dd class="face"><img src="/face/0.gif" alt="头像选择" id="faceimg"/></dd>
var faceimg=document.getElementByld('faceimg');
faceimg.onclick=function(){
window.open('face.php','face','width=400,height=400,top=0,left=0,scrollbars=1');
}
};
这段点击图片出新窗口的代码对否?
为什么我总是无效呢?
<dd class="face"><img src="/face/0.gif" alt="头像选择" id="faceimg"/></dd>
eft=0,scrollbars=1');
scrollbars参数值是 yes或no吧?
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.0/jquery.min.js"></script>
<script type="text/javascript" language="javascript">
window.onload=function(){
var faceimg=document.getElementById('faceimg');
faceimg.onclick=function(){
window.open('face.php','face','width=400,height=400,top=0,left=0,scrollbars=1');
}
};
</script>
</head>
<body>
<dd class="face"><img src="/face/0.gif" alt="头像选择" id="faceimg"/></dd>
</body>
</html>