首页技术为王JavascriptJS入门到精通 第2章 JavaScript基础

JS入门到精通 第2章 JavaScript基础

分类Javascript时间2026-04-04 09:55:35发布信义之树浏览10
导读:一、练习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/


JS入门到精通 第1章 初识JavaScript

游客 回复需填写必要信息