小编Nik*_*las的帖子

D中printf()和writeln()之间的区别

D编程语言printf("Hello, world!")writeln("Hello, world!")D编程语言有什么区别?

我注意到它writeln()最终会被自己打破,而printf()不是.这是唯一的区别吗?

d

4
推荐指数
1
解决办法
206
查看次数

D if或/和python这样的语句

D有任何表达方式和/或if语句吗?

if (1 > 2 or 3 < 5 and 1 == 1)
{
/* run code */
}
Run Code Online (Sandbox Code Playgroud)

像这样.

d

1
推荐指数
1
解决办法
87
查看次数

如何根据URL路径添加CSS类?

我如何根据我所处的路径向div添加一个CSS类,包括如果我有#在其中它不应该是mather?

<div class="popup">
    <ul>
        <li><a href="#vs">Example 1</a></li>
        <li><a href="#bod">Example 2</a></li>
        <li><a href="#ptf">Example 3</a></li>
    </ul>
</div><!-- popup -->

<!-- how would I add the class addMe with javascript depending on the site path? It has to work with # -->
Run Code Online (Sandbox Code Playgroud)

jsfiddle.net/zatox50/wBxkj/

示例index.html

javascript css class

0
推荐指数
1
解决办法
6254
查看次数

标签 统计

d ×2

class ×1

css ×1

javascript ×1