当前位置:网站首页>Js基础学习Script
Js基础学习Script
2022-06-11 08:04:00 【.---】
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>day1demo4</title>
<script> function myFunction(){
document.getElementById("clickOne").innerHTML="我的第一个 JavaScript 函数"; } </script>
</head>
<body>
<h1>我的 Web 页面</h1>
<p id="clickOne">一个段落。</p>
<button type="button" onclick="myFunction()">点击这里</button>
</body>
</html>
script在运行的时候会被直接调用,但是里面的函数需要我们自己去操作调用
比如这里是我们点击了按钮实现了myFunction函数然后把Id为clickOne的标签改变其内容
边栏推荐
- C language lesson 2
- Socket [5] - struct linker usage
- Getting started with bladed tutorial (video)
- Remote office experience sharing | community essay solicitation
- Magnifying mirror rendering
- Typescript header file usage details
- TypeScript-分布式条件类型
- Activity中,View#postDelay会导致内存泄漏,但是不会影响Activity的生命周期执行。
- C- print 99 multiplication table
- 2021-11-05 definition of cache
猜你喜欢

记一次忽略@SuppressLint(“NewApi“)提示引发的血案

Selenium click the floating menu and realize the functions of right mouse button

Using Tkinter to realize guessing numbers game

嵌入式软件面试问题总结

2021-11-05 definition of cache

图数据库无缝集成Tushare接口

How to output the percent sign "%" in printf function in C language

A detailed explanation of one of the causes of dead loop caused by array out of bounds in C language

Figure seamless database integration tushare interface

Typescript header file usage details
随机推荐
Dameng database login
TypeScript-null和undefined
Typescript type alias
Printing diamond of beginner C
空间几何
134. 加油站
TypeScript-在koa中配置TS和使用koa-router
使用特殊字符拼接字符串“+“
DAMENG 数据库启停
Typescript type protection
Tutoriel de démarrage bladed (vidéo)
Thoroughly remember the difference between ImageView background and SRC
Clipping and overlapping of YUV data
Servlet
Sort - Swap sort
Label the mask image not obtained through labelme
DAMENG 数据库登陆
Typescript declaration merge
运筹学导论
multi-sig SC