src

JavaScript打字小游戏

只愿长相守 提交于 2019-12-25 02:33:41
  上半年自学了JavaScript,然后就做了个打字小游戏玩玩。    功能模块:    程序设计:    1.可选择游戏时间,显示倒计时       1.定义全局变量    2.可选择英文字母出现个数         2.控制游戏时间函数    3.统计得分                3.动画效果    4.菜单选项                4.设定字母图片出现的时间                         5.判断函数                         6.游戏菜单                         7.游戏时间选项                         8.显示游戏时间                         9.游戏难度选项                         10.游戏得分       先上效果图: (PS:美工是硬伤)          主要代码设计: View Code 1 //-------全局变量------- 2 var data={ 3 "10":["<img src='images/A.gif'/>"],"11":["<img src='images/B.gif'/>"],"12":["<img src='images/C.gif'/>"],"13":["<img src=

Img Src correct, but still not working in index.php

前提是你 提交于 2019-12-25 01:47:30
问题 I believe I've correctly sourced an image in html for a (super-basic) wordpress theme I am developing; however it still does not display. This dialogue: Img Src on local computer shows the process so far (whereby I've been reassured the html is correct.) body of index.php: <?php $main_menu_column_top = array( 'theme_location' => 'main-nav-column-top', 'container' => 'nav', 'container_class' => 'alignleft widecol', 'container_id' => 'column-main-nav', 'depth' => 1 ); ?> <div class="leftcolumn"

linux上编译并运行单个java文件

主宰稳场 提交于 2019-12-25 01:30:26
linux上编译并运行单个java文件 1、先创建java项目目录,名称project。 mkdir project 2、在项目中创建src和bin目录,src下用于存放 “.java” 文件,bin下存放 “ .class ” 文件。 cd project mkdir src bin 3、在src下创建包com.company。 mkdir -p src/com/company 4、在包中编写java文件,文件名为Test.java。 vi src/com/company/Test.java package com.company; // 包名 public class Hello{ public static void main(String[] args){ System.out.println("test success"); } } // vim中编写,完成后保存退出。 5、在bin目录下创建用于存放project项目中生成的class文件的目录。 mkdir bin/project 6、编译java文件,将生成的编译文件存放在bin/project下,其中的com/company目录会自动创建,因为“package com.company;”语句。“-d”表示指定生成class文件的位置。 javac ./src/com/company/Test.java -d .

Is there any difference between ./ and / in <script> src attribute? [duplicate]

孤者浪人 提交于 2019-12-24 16:52:41
问题 This question already has answers here : What does “./” (dot slash) refer to in terms of an HTML file path location? (10 answers) Closed 8 months ago . Given the following project structure: /root /static script.js page.html This will ' import ' script.js , into the HTML file: <html> <head> <script src="/static/script.js"></script> </head> <body> ... </body> </html> this will, as well: <html> <head> <script src="./static/script.js"></script> </head> <body> ... </body> </html> I am wondering:

change ckeditor iframe dialog url

喜欢而已 提交于 2019-12-24 10:28:02
问题 I'm developing a ckeditor plugin. I have a iframe dialog like this: CKEDITOR.dialog.add( 'imageDialog', function () { return { title : 'add image', minWidth : 700, minHeight : 360, contents : [ { id : 'iframe', label : 'Lien', expand : true, elements : [ { type : 'iframe', src : 'index.php', width : '100%', height : '100%', onContentLoad : function() { } } ] } ], buttons: {disabled:true} }; } ); and I want to change the src url each time the dialog opens. How can I do this? 回答1: I succeeded

Gulp exclude does not work as expected

我是研究僧i 提交于 2019-12-24 06:21:07
问题 I have a gulp task that looks like this, just the src part: gulp.src( [ 'site/bricks/global/global.scss', 'site/bricks/**/*.scss', '!site/bricks/global/domain*.scss', 'site/bricks/global/domain.mydomain.com.scss' ]) I expect it to do this: Load global.scss first (works) Load the rest of the scss files (works) Exclude all but domain (works) Include one of my domains back (does not work) So for some reason I can't add a domain back to the list. Any ideas? 回答1: It looks like that is expected

Gulp exclude does not work as expected

こ雲淡風輕ζ 提交于 2019-12-24 06:19:09
问题 I have a gulp task that looks like this, just the src part: gulp.src( [ 'site/bricks/global/global.scss', 'site/bricks/**/*.scss', '!site/bricks/global/domain*.scss', 'site/bricks/global/domain.mydomain.com.scss' ]) I expect it to do this: Load global.scss first (works) Load the rest of the scss files (works) Exclude all but domain (works) Include one of my domains back (does not work) So for some reason I can't add a domain back to the list. Any ideas? 回答1: It looks like that is expected

setting src of html <script> in javascript

江枫思渺然 提交于 2019-12-24 04:06:08
问题 I'm trying to set the src attribute of a script tag using: document.getElementById("setScript").setAttribute("src","adventures/" + setting + ".js"); The "setScript" is obviously the id of the script tag, and the setting variable is a parameter to change the script. I tested to make sure the src was actually being set, using: alert(document.getElementById("setScript").getAttribute("src")); Which printed out adventures/[whatever the parameter was].js. When i type exactly that in the src value

Vue中的静态资源管理(src下的assets和static文件夹的区别)

廉价感情. 提交于 2019-12-24 03:28:43
### 你可能注意到了我们的静态资源共有两个目录src/assets和static/,你们它们之间有怎样的区别呢? 资源打包 为了回答这个问题,我们需要了解webpack是如何处理静态资源的。 在所有的*.vue文件中你所有的templates 和CSS 都被vue-html-loader 和css-loader 查询资源的URLs解析. 比如说, 在 img src=”./logo.png” 和 background: url(./logo.png) 中./logo.png是一个相对资源路径,并且会被Webpack视为一个模块依赖来解析。 因为./logo.png并非一个Javascript,当将它作为模块依赖对待时,我们需要用url-loader和file-loader去处理它。这种公式化处理早已经为你配置了loader,所以你基本上可以获得诸如文件名指纹和有条件的内嵌base64,因此你能够使用相对/模块路径而不必担心部署问题。 自从这些资源可以在build期间被内联/复制/重命名,它们本质上来讲是你资源代码的一部分。这就是为什么它们被推荐用于延源资源替换Webpack-processed的内部/src资源。事实上,你甚至不必将它们放进/src/assets:你可以基于模块/组件去组织它们并使用,你可以将每一个组件放进他们自己的文件夹,随着它的静态文件正确的紧挨着它。

get src attribute of an image based on class or id

孤人 提交于 2019-12-24 03:11:29
问题 I want to get src in image based on class or id. Ex. On html page there are many <img src="url"> but only one have a class or id: <img src="url" class="image" or id="image"> How to get right src attribute wich have a specific class or id? Pls regex not dom I gonna explain you why I dont want to use dom or other libraries because I'm getting a html page from an other site which not allow fopen or _file_get_contents or DOM but only Curl could do this. Sure I have a reason why I not use these