小编Tim*_*des的帖子

加载大量图像的最佳方式

我创建了一个基本的 html 网站,它有一个带有图像的画廊。它根据拍摄的月份存储它们。所有图像的页面加载速度都很慢,是否有更好的方法来存储图像以使其加载速度更快?

谢谢

html css image

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

将最大数组值写入控制台窗口

我确信我遗失了一些愚蠢的东西.我想将消息打印到控制台窗口,并在同一行显示最大数组值.

当我在没有控制台消息的情况下运行代码时,它运行完美,但是当我使用消息运行代码时,它只显示消息而没有最大值.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Arrays
{
    class Program
    {
        static void Main(string[] args)
        {
            int[] newArray = new int[6];

            newArray[0] = 0;
            newArray[1] = 1;
            newArray[2] = 2;
            newArray[3] = 49;
            newArray[4] = 3;
            newArray[5] = 82;

            Console.Write("The highest number in the array is: ",  newArray.Max());
            Console.ReadLine();
        }
    }
}
Run Code Online (Sandbox Code Playgroud)

我刚刚开始掌握数组,但我无法找到解决上述问题的方法.

.net c# arrays string console-application

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

$(document).ready(function(){}); 投掷错误

我刚开始学习JavaScript,特别是Jquery.

我看到了$(document).ready(function(){}); 并把它放在我的代码中查看它,但是当我在我的html的标头标签中定义它时,脚本标签会在下面抛出绿色错误行.如果打开脚本标记已关闭<script>,则会引发期望类型的错误.我输入了类型,然后决定从脚本中删除结束标记,以便代码被拾取并告诉我它需要关闭>标记.

我不知道发生了什么,因为我有完整的代码示例.

我正在使用Visual Web开发人员2010快递.

<!Doctype html>
<html lang="en-us">
<head>
<meta charset="utf-8" />
    <title>Practising Javascript</title>
    <script type="text/javascript" src="Practise.js"></script>
    <script type="text/javascript" src="jquery-1.12.0.js"> </script>
    <script> type="text/javascript" $(document).ready(function () {}); </script>
</head>
<body>


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

html javascript jquery

-1
推荐指数
2
解决办法
461
查看次数

标签 统计

html ×2

.net ×1

arrays ×1

c# ×1

console-application ×1

css ×1

image ×1

javascript ×1

jquery ×1

string ×1