小编get*_*way的帖子

使用PHP删除文件夹中的所有文件?

例如,我有一个名为`Temp'的文件夹,我想使用PHP删除或刷新此文件夹中的所有文件.我可以这样做吗?

php directory glob file

289
推荐指数
10
解决办法
31万
查看次数

如何使用jQuery从div中删除id属性?

我想从此图片中删除id属性:

<img width="270" class="thumb" id="thumb" height="270" src="img/1_1.jpg" />
Run Code Online (Sandbox Code Playgroud)

我试过这样做:

$('img#thumb').RemoveAttr('id','none');
Run Code Online (Sandbox Code Playgroud)

但它不是删除ID!

编辑:

$('img#thumb').attr('src', response);
$('img#thumb').attr('id', 'nonthumb');
Run Code Online (Sandbox Code Playgroud)

这个deosnt加载图片,或者在这种情况下是src!但是当我删除id属性时,它工作正常

html javascript jquery image

72
推荐指数
2
解决办法
12万
查看次数

使用jquery更改背景图像

我有这个jquery代码,可以在点击时更改背景图像:

$('a.note').click(function(){
  $('#full').css('background-image','img/1.jpg');

});
Run Code Online (Sandbox Code Playgroud)

但是,它并没有改变.有什么我想念的吗?

css jquery background-image

23
推荐指数
1
解决办法
6万
查看次数

如何在悬停时更改按钮的颜色?

我需要在悬停时更改按钮的颜色.

这是我的解决方案,但它不起作用.

a.button {
   display: -moz-inline-stack;
   display: inline-block;
   width: 391px;
   height: 62px;
   background: url("img/btncolor.png") no-repeat;
   line-height: 62px;
   vertical-align: text-middle;
   text-align: center;
   color: #ebe6eb;
   font-family: Zenhei;
   font-size: 39px;
   font-weight: normal;
   font-style: normal;
   text-shadow: #222222 1px 1px 0;
}
a.button a:hover{
     background: #383;
}
Run Code Online (Sandbox Code Playgroud)

css button hover

20
推荐指数
2
解决办法
16万
查看次数

如何使用jQuery动画更改背景图像?

我想用慢动画改变背景图像,但它不起作用

 $('body').stop().animate({background:'url(1.jpg)'},'slow');
Run Code Online (Sandbox Code Playgroud)

语法有问题!!

jquery animation background image

18
推荐指数
1
解决办法
9万
查看次数

css list inline不是水平列出项目?

我不知道为什么这个显示不正确,列表是水平显示的?而是垂直显示!

这是我的代码:

#stats li {
  display: inline;
  list-style-type: none;
  padding-right: 20px;
}
Run Code Online (Sandbox Code Playgroud)
<ul id="stats">
  <li>
    <h1>53</h1>
    </a>
  </li>
  <li>
    <h1>67</h1>
    </a>
  </li>
</ul>
Run Code Online (Sandbox Code Playgroud)

html css inline html-lists

15
推荐指数
2
解决办法
7万
查看次数

在HTML中使用<label>是否重要?

请原谅我可能非常愚蠢的问题,但我的好奇心正在扼杀我,而且我是新手,但是你在标记中使用了重要的标签,为什么?

<label for="birthdate">Birthdate:</label>
<input type="text" id="birthdate" name="birthdate" />
Run Code Online (Sandbox Code Playgroud)

为什么我必须标记这个输入,为什么它对用户有益,为什么对将来的使用有益,或者它是搜索引擎优化的东西.这就是我真正想知道的:)

html forms labels

14
推荐指数
3
解决办法
5118
查看次数

所有浏览器都支持marquee HTML元素吗?

可以使用<marquee>HTML元素了吗?我的意思是,是否所有浏览器都支持它?我知道Twitter正在使用它,我认为这对于公告非常有用,我想使用它,但我不知道它是否能正常使用.有人知道吗?

html marquee

9
推荐指数
2
解决办法
4813
查看次数

php中的黑客新闻算法?

这是黑客新闻排名算法,我认为这是一种简单的排序方式,特别是如果用户对项目进行投票,但我真的不明白这一点,这可以转换为PHP,所以我可以完全理解它吗?

; Votes divided by the age in hours to the gravityth power.
; Would be interesting to scale gravity in a slider.


(= gravity* 1.8 timebase* 120 front-threshold* 1
           nourl-factor* .4 lightweight-factor* .17 gag-factor* .1)

        (def frontpage-rank (s (o scorefn realscore) (o gravity gravity*))
          (* (/ (let base (- (scorefn s) 1)
                  (if (> base 0) (expt base .8) base))
                (expt (/ (+ (item-age s) timebase*) 60) gravity))
             (if (no (in s!type 'story 'poll))  .8
                 (blank s!url)                  nourl-factor*
                 (mem …
Run Code Online (Sandbox Code Playgroud)

lisp algorithm ranking arc-lisp

8
推荐指数
2
解决办法
1464
查看次数

changing colors with jquery with a color picker?

i have this jquery script that changes the color of the background instantly by entering a color code into the textbox, the working example is in jsfiddle link below.

http://jsfiddle.net/7jg4e/

but instead of the input field i wanted to use a color picker custom skin, becuase i dont want user to deal with hex code(just like twitter). the jquery plugin im trying to use is found at

http://www.eyecon.ro/colorpicker/

at the buttom of the page it has the neat color picker …

html javascript css jquery colors

8
推荐指数
2
解决办法
3万
查看次数