请问那里错了?谢谢
我想给s赋值,可不成,请问那里错了?谢谢!
<script language=javascript>
var s;
var ss;
if(ss=="") s=1;
else s=ss;
document.write(s); //运行后显示undefined
</script>
------解决方案--------------------<script language=javascript>
var s;
var ss='';
if(ss=="") s=1;
else s=ss;
document.write(s); //运行后显示undefined
</script>
------解决方案--------------------你的ss没有初始化
------解决方案--------------------1楼正解