小编Dar*_*htA的帖子

这些JavaScript按位运算符有什么作用?

  • x <<= y (x = x << y)
  • x >>= y (x = x >> y)
  • x >>>= y (x = x >>> y)
  • x &= y (x = x & y)
  • x ^= y (x = x ^ y)
  • x |= y (x = x | y)

这些不同的运营商做了什么?

javascript bit-manipulation operators

9
推荐指数
3
解决办法
2701
查看次数

我的第一个应用.错误:无效的开始标记LinearLayout.为什么?

它工作得很好,但后来我进行了一些小的编辑,现在它没有工作......这是主要的布局xml文件...它在第3行给出了一个错误.

<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="horizontal"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">

    <LinearLayout
        android:layout_width="0dip"
        android:layout_height="fill_parent"
        android:orientation="vertical"
        android:layout_weight="6">

        <TextView
            android:layout_width="fill_parent"
            android:layout_height="0dip"
            android:layout_weight="2"
            android:background="#FFFF00"
            android:text="@string/yellow"
            android:textColor="#FFFFFF"
            android:gravity="center_horizontal"
            />
        <TextView
            android:layout_width="fill_parent"
            android:layout_height="0dip"
            android:layout_weight="1"
            android:background="#FFFFFF"
            android:text="@string/helo"
            android:textColor="#000000"
            android:gravity="center_horizontal"
            />
        <TextView
            android:layout_width="fill_parent"
            android:layout_height="0dip"
            android:layout_weight="1"
            android:background="#FFFF00"
            android:text="@string/yellow"
            android:textColor="#FFFFFF"
            android:gravity="center_horizontal"
            />

    </LinearLayout>
    <LinearLayout
        android:layout_width="0dip"
        android:layout_height="fill_parent"
        android:orientation="vertical"
        android:layout_weight="4">

        <TextView
            android:layout_width="fill_parent"
            android:layout_height="0dip"
            android:text="@string/blue"
            android:layout_weight="3"
            android:textColor="#FFFFFF"
            android:background="#0000FF" />

        <TextView
            android:background="#FFFFFF"
            android:text="@string/helo"
            android:layout_width="fill_parent"
            android:layout_height="0dip"
            android:textColor="#000000"
            android:layout_weight="1" />

        <TextView
            android:layout_width="fill_parent"
            android:layout_height="0dp"
            android:layout_weight="1"
            android:textColor="#FFFFFF"
            android:text="@string/yellow"
            android:background="#FFFF00" />

        <TextView
            android:layout_width="fill_parent"
            android:layout_height="0dp"
            android:layout_weight="1"
            android:text="@string/blue"
            android:background="#0000FF"
            android:textColor="#FFFFFF" />
    </LinearLayout> …
Run Code Online (Sandbox Code Playgroud)

android

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

如何在HTML中创建底部固定位置菜单?

我想在浏览器窗口的最底部创建一个框菜单.

  • 当内容未填满整个屏幕时,它应保持在底部
  • 当内容溢出时,它应该只在您向下滚动时位于底部(即如果您不滚动则无法看到它).

我该怎么做呢?

html css layout menu

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

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

在交换机外的javascript(标签:东西)中使用标签有什么意义?

在交换机外的javascript(标签:东西)中使用标签有什么意义?

javascript

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

文本扩展到div里面?

我有这个代码:

<html>
<head>
<style type="text/css">

body {
    text-align: center;
}

#content {
    width: 60em;
    margin: 0, auto;
    background-color: #CCC;
}

</style>
</head>

<body>
<center>
<div id="content">kdsjlglkdfjgolksdjflgojsdfsdoljfglsdfghsdkjfgkdhfgkhlglkdfjgolksdjflgojsdfsdoljfglsdfghsdkjfgkdhfgklglkdfjgolksdjflgojsdfsdoljfglsdfghsdkjfgkdhfgklglkdfjgolksdjflgojsdfsdoljfglsdfghsdkjfgkdhfgklglkdfjgolksdjflgojsdfsdoljfglsdfghsdkjfgkdhfgklglkdfjgolksdjflgojsdfsdoljfglsdfghsdkjfgkdhfgklglkdfjgolksdjflgojsdfsdoljfglsdfghsdkjfgkdhfgklglkdfjgolksdjflgojsdfsdoljfglsdfghsdkjfgkdhfgkkjdghkdsfjgksdjfhg</div>
</center>
</body>

</html>
Run Code Online (Sandbox Code Playgroud)

为什么文本不会留在div中,而是一行直到它结束?我希望它有相对于div里面的换行符.我怎样才能做到这一点?

html css

4
推荐指数
2
解决办法
4549
查看次数

在javascript中使用不好的做法?

我认为那样的东西with(Math){document.body.innerHTML= PI}不是很好的做法.

javascript with-statement

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

如何在HTML中运行PHP?

如果我有一个文件file.php,与index.html位于同一目录中:

file.php:

<?php
echo "<body><img src=\"hi.jpg\" /><br /><p>I was here</p>"
?>
Run Code Online (Sandbox Code Playgroud)

index.html的:

<html>
<head></head>
<!-- I want to enter the PHP in file.php here --></body>
</html>
Run Code Online (Sandbox Code Playgroud)

如何将file.php放入index.html?

html php embed embedding

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

在javascript中,'\'和'\n'之间有什么区别?

我认为\和\n都可以用作换行符.有什么不同?

编辑:对不起我意识到我错了.教程是关于/作为程序员的换行符,没有显示,即:

alert("Hi \
there");
Run Code Online (Sandbox Code Playgroud)

javascript line-breaks

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

javascript中'for ... in'和'for each ... in'之间有什么区别?

我知道在C#中你使用这样的foreach:foreach string str in array1 {console.writeline(str);} 是"for each ... in"在JavaScript中也是这样使用的吗?

javascript foreach for-loop

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