JS入门到精通 第2章 JavaScript基础
导读:一、练习1 1. 源代码<!doctype html> <html> <head> <meta charset="utf-8"> <title>输出红、绿、蓝3种颜色的值</title> </head> &l...
一、练习1
1. 源代码
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>输出红、绿、蓝3种颜色的值</title>
</head>
<body>
<script type="text/javascript">
document.write("RGB颜色#6699FF的3种颜色的色值分别为:");
document.write("<p>R:"+0x66);
document.write("<p>G:"+0x99);
document.write("<p>B:"+0xff);
</script>
</body>
</html>2. 运行页面
https://www.xinyizhishu.top/jsC/sc/2_1/