<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>+操作符</title>
<script type="text/javascript">
var mynum= 37;
var mychar=98;
document.write("mynum的值:"+mynum+"<br>");
document.write("mychar的值:"+mychar);
document.write("mychar的值:"+mychar+mynum);
</script>
</head>
<body>
</body>
</html>
document.write("mychar的值:"+(mychar+mynum));才可以输出135
Camel97
相关分类