<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>test</title>
<script>
function $(id){
return document.getElementById(id);
}
function operation(id){
var obj = $(id);
if(obj.style.display=="none"){
obj.style.display="block";
//alert("show");
}else{
obj.style.display="none";
//alert("hide");
}
}
</script>
<style>
div{
border:1px solid blue;
line-height:50px;
width:200px;
}
</style>
</head>
<body>
<center>
<div id="div_1" onclick="operation('div_2');">click here</div>
<br/>
<br/>
<div style="border:1px solid red;" id="div_2">content</div>
</center>
</body>
</html>
分享到:
相关推荐
<div class=app-NewsInfo> <h3>{{info.title}} <!-- 新闻评论子组件。 --> <comment id=id></comment> </div> [removed] import comment from ../sub/comment.vue; export default { data() {
React挂钩可迭代地调整字体大小,以使文本适合div。 通过检查文本是否溢出 当容器被调整大小重新计算(使用( ) ) 内容更改时重新计算 使用二进制搜索; 使用默认选项时,最多进行5次调整,分辨率从20%到100%...
DIV+CSS布局中不推荐使用的标签集合Dont Use These Tags
useFetch 获取React的钩子安装npm install @ahmetelgun/usefetch用法import useFetch from "@ahmetelgun/usefetch" ;..const [ response , loading , error ] = useFetch ( "url" ) ;if ( loading ) { return < div>...
SandDock is our award-winning window management software that enables dockable floating windows, tabbed documents and other advanced window management functionality in applications that use it....
$ npm install use-axios-client 与纱线: $ yarn add use-axios-client 例子 import { useAxios } from 'use-axios-client' ; export default ( ) => { const { data , error , loading } = useAxios ( { url :...
React使用间隔 这是react挂钩的自定义版本,用于设置发布在overreacted.io上的时间间隔。 安装 npm install --save @ascendum/use-interval 用法 ... < div> < button onClick = { toggleRunnin
Div100vh React组件和use100vh React钩子 这是针对iOS Safari和其他移动浏览器的解决方法。 问题 在移动浏览器中,视口的实际高度是动态的,因为浏览器的“ chrome”(面板)在滚动时会滑开。 浏览器开发人员面临两...
:stopwatch: 使用计时器 简单的计时器变成了React Hooks。 了解有关功能的信息。 安装 npm i use-timer ... < div> < button onClick = { start } > Start < / button > < button onClick = { paus
用法:需要在 use 中定义 window 函数供外部引用。 // 调用成功 <div class=layui-form-item> 原密码 <div class=layui-input-block> <input type=text name=password id=oldpass οnchange=pass1() class=...
安装npm i 参考import { Provider , useT , withT , Trans , Consumer , context } from 'use-t' ;例子import { Provider , useT } from 'use-t' ;const Hello = ( props ) => { const [ t ] = useT ( ) ; return ( ...
import { useMedia } from 'react-use-media' ; const Demo = ( ) => { const isWide = useMedia ( { minWidth : 1000 , } ) ; return ( < div> Screen is wide: { isWide ? ':grinning_face_with_big_eyes:'...
use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; use ieee.std_logic_unsigned.all; entity clk_8div is port( clk:in std_logic; clk_div2:out std_logic; clk_div4:out std_logic; clk_div8:out...
USE IEEE.STD_LOGIC_1164.ALL; USE IEEE.STD_LOGIC_ARITH.ALL; USE IEEE.STD_LOGIC_UNSIGNED.ALL; ---------------------------------------------- ENTITY clk_div IS PORT( clk: IN STD_LOGIC;--时钟输入 clk_div2...
使用移动检测钩React挂钩以检测设备类型。 该挂钩能够检测移动设备,台式机,Android或iOS设备。... return ( < div> is Mobile: { detectMobile . isMobile ( ) } < br> is Desktop: { detectMobile
使用力更新挂钩 React钩子将给功能组件。安装npm i --save-dev use-force-update-hook用法该软件包导出2个钩子: useForceUpdate和useForceUpdateWithCallback 。... log ( 'render' ) return ( < div> <
使用表工具 React Hooks用于构建Kickass React Table组件 介绍 use-table-tools是一个React Hooks库,用于构建kickassReact表组件。 它具有以下特点: ... return < div> hello from table component < / di
import useLocalStorage from 'react-use-localstorage' ;import './styles.css' ;function App ( ) { const [ item , setItem ] = useLocalStorage ( 'name' , 'Initial Value' ) ; return ( < div xss=removed> ...
网上的解决方案: From:http://codingforums.com/showthread.php?t=95109 (a) place Flash embed script in <div> container (I use SWFObject.js)[将flash嵌入脚本放到一个div容器中] (b) add wmode=transparent to ...
css中的cursor https://www.runoob.com/cssref/pr-class-cursor.html 鼠标跟随效果如何实现: (子绝父相)绝对定位 + 修改top,left控制移动 在@vueuse中,有一个工具方法:useMouseInElement <template> <div ...