按钮

Javascript实例

不羁的心 提交于 2020-01-16 00:14:22
1、Javascript消息框 (1)Alert(警告)框 (2)带有换行的警告框 < ! DOCTYPE html > < html > < head > < meta charset = "utf-8" > < title > JavaScript的使用 < / title > < / head > < body > < p > 点击按钮在弹窗总使用换行。 < / p > < button onclick = "myFunction()" > 点我 < / button > < p id = "demo" > < / p > < script > function myFunction ( ) { alert ( "Y\nHow are you?" ) ; } < / script > < / body > < / html > (3)确认框 < ! DOCTYPE html > < html > < head > < meta charset = "utf-8" > < title > Javascript的使用 < / title > < / head > < body > < p > 点击按钮,显示确认框。 < / p > < button onclick = "myFunction()" > 点我 < / button > < p id = "demo" > < / p

Bootstrap

China☆狼群 提交于 2020-01-15 23:09:15
Bootstrap介绍 Bootstrap是Twitter开源的基于HTML、CSS、JavaScript的前端框架。 它是为实现快速开发Web应用程序而设计的一套前端工具包。 它支持响应式布局,并且在V3版本之后坚持移动设备优先。 为什么要使用Bootstrap? 在Bootstrap出现之前: 命名:重复、复杂、无意义(想个名字费劲) 样式:重复、冗余、不规范、不和谐 页面:错乱、不规范、不和谐 在使用Bootstrap之后: 各种命名都统一并且规范化。 页面风格统一,画面和谐。 Bootstrap下载 官方地址:https://getbootstrap.com 中文地址:http://www.bootcss.com/ 我们使用V3版本的Bootstrap,我们下载的是用于生产环境的Bootstrap。 Bootstrap环境搭建 目录结构: bootstrap-3.3.7-dist/ ├── css // CSS文件 │ ├── bootstrap-theme.css // Bootstrap主题样式文件 │ ├── bootstrap-theme.css.map │ ├── bootstrap-theme.min.css // 主题相关样式压缩文件 │ ├── bootstrap-theme.min.css.map │ ├── bootstrap.css │ ├──

转:JS实现刷新iframe的方法

强颜欢笑 提交于 2020-01-15 21:41:32
<iframe src="1.htm" name="ifrmname" id="ifrmid"></iframe> 方案一:用iframe的name属性定位 <input type="button" name="Button" value="Button" onclick="document.frames('ifrmname').location.reload()"> 或 <input type="button" name="Button" value="Button" onclick="document.all.ifrmname.document.location.reload()"> 方案二:用iframe的id属性定位 <input type="button" name="Button" value="Button" onclick="ifrmid.window.location.reload()"> 终极方案:当iframe的src为其它网站地址(跨域操作时) <input type="button" name="Button" value="Button" onclick="window.open(document.all.ifrmname.src,'ifrmname','')"> 来源: https://www.cnblogs.com/liukai/archive

Jquery Mobile基本元素

六眼飞鱼酱① 提交于 2020-01-15 19:14:58
移动端框架 安装: CDN: <link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.css"> <script src="http://code.jquery.com/jquery-1.8.3.min.js"></script> <script src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js"></script> 或者: 下载文件 页面: <!-- HTML5 data-* 属性用于通过 jQuery Mobile 为移动设备创建“对触控友好的”交互外观 --><!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.css"> <script src="http://code.jquery.com/jquery-1.8.3.min.js"></script> <script src="http://code.jquery.com/mobile/1.3

右下角的悬浮按钮

送分小仙女□ 提交于 2020-01-15 18:15:20
在网页上做一个右下角悬浮的按钮 代码: < div onclick = " location.href= ' invite3 ' " > < img src = " ./xuanfu.png " style =" width : 5rem ; height : 5rem ; position : fixed ; bottom : 5rem ; right : 1rem ; z-index : 9999 ; " /> </ div > 来源: CSDN 作者: Z安迷修 链接: https://blog.csdn.net/qq_44747508/article/details/103990528

WebHtmlEditor Version 1.5.2004.729 Beta1 发布测试

馋奶兔 提交于 2020-01-15 08:54:14
[ 最新功能预览 ],如果您想加入其他的功能可以以外挂的形式集成到 WebHtmlEditor 中[演示: 将CodeHighlighter以外挂的形式集成到 WebHtmlEditor ] 如果您对 WebHtmlEditor 的研发工作感兴趣,可以 给我邮件 或到 WebHtmlEditor官方论坛 中给我留言。 什么是 WebHtmlEditor? 她是一个网页的在线文本编辑器,她能够在网页上实现许多桌面编辑软件(如:Word)所具有的强大可视编辑功能;她是一个真正的绿色软件,不需要在计算机上安装任何的客户端软件;并且她是完全开放源代码的,允许无商业目的个人用户免费使用。 如在商业上使用请与我联系。 资源: 下载目录: http://www.lionsky.net 这个软件的许可协议为GPL。 详细请看GPL.txt或访问 http://www.opensource.org/licenses/gpl-license.php 下载地址:[WebHtmlEditor Version 1.5.2004.729 Beta1 Demo ] http://www.lionsky.net/MyWebsite/downsoft/index.aspx 在线演示: http://www.lionsky.net/Demo/WebHtmlEditor/1_5/Default.htm 最 新 更 新

SUI Mobile

一笑奈何 提交于 2020-01-15 07:49:30
<header class="bar bar-nav"> <h1 class='title'>只有图标的表单</h1> </header> <div class="content"> <div class="list-block"> <ul> <!-- Text inputs --> <li> <div class="item-content"> <div class="item-media"><i class="icon icon-form-name"></i></div> <div class="item-inner"> <div class="item-input"> <input type="text" placeholder="Your name"> </div> </div> </div> </li> <li> <div class="item-content"> <div class="item-media"><i class="icon icon-form-email"></i></div> <div class="item-inner"> <div class="item-input"> <input type="email" placeholder="E-mail"> </div> </div> </div> </li> <!-- Select --> <li>

Android属性动画学习二

不打扰是莪最后的温柔 提交于 2020-01-15 06:15:24
原文链接 Android ObjectAnimator类学习 1.简介 实现属性动画中的一个核心方法类 继承自ValueAnimator类,即底层的动画实现机制是基于ValueAnimator类 2.实现动画的原理 直接对对象的属性值进行改变操作,从而实现动画效果 如直接改变 View的 alpha 属性 从而实现透明度的动画效果 3.基础使用 透明度 public class MainActivity extends AppCompatActivity { Button button; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); button = findViewById(R.id.btn_anim); init(); } private void init() { ObjectAnimator animator=ObjectAnimator.ofFloat(button,"alpha",1f,0f,1f,0f,1f); // 设置动画时长 animator.setDuration(2000); //重复次数。无限次 animator

initWithFrame和initWithCoder的区别

我怕爱的太早我们不能终老 提交于 2020-01-15 04:11:49
如果使用了Interface Builder 方式或nib,就不会调用initWithFrame方法,因为nib文件知道怎么初始化了, 但可以使用initWithCoder这一个更深层的init方法来重新定义nib文件的各种属性 - (id)initWithCoder:(NSCoder*)coder - (id)initWithFrame:(CGRect)frame initWithFrame方法用来初始化并返回一个新的视图对象,根据指定的CGRect(尺寸)。 UIView *contentView = [[ UIView alloc ] initWithFrame : Back_Button_Frame ]; #define Back_Button_Frame CGRectMake(- 20 , 0 , 50 , 35 ) 如果使用了编程方式,手动代码定义UIView类或其子类等, 如果在子类中加载initWithFrame方法,必须先调用父类的initWithFrame方法。 就用initWithFrame 来源: https://www.cnblogs.com/yidoucai/p/5026666.html

04.React 事件绑定

 ̄綄美尐妖づ 提交于 2020-01-15 02:38:43
04.React 事件绑定 1.事件与原生事件类型 react中式on+首字母大写的事件名 例如onClick 2.普通函数和箭头函数 < button onClick = { function ( ) { alert ( "普通函数" ) ; } } > 按钮 1 < / button > < button onClick = { ( ) => { alert ( "箭头函数" ) ; } } > 按钮 2 < / button > 3.直接绑定函数 3.1不使用this show4 ( ) { alert ( "直接绑定函数不能使用this" ) ; } < button onClick = { this . show4 } > 按钮 4 < / button > 3.2使用箭头函数 使用this show5 = ( ) => { alert ( "用箭头函数让this指向类 " + this . state . date ) ; } ; < button onClick = { this . show5 } > 按钮 5 < / button > 3.3用bind绑定this constructor ( props ) { super ( props ) ; this . state = { date : new Date ( ) . toLocaleDateString (