【问题标题】:Taking 2 separated Data and insert in SQL database取 2 个分离的数据并插入 SQL 数据库
【发布时间】:2013-11-14 09:52:46
【问题描述】:

这有点复杂,但我设法做到了这一点。

http://medieproduktion.mediacollege.dk:10279/Game1/

如果你去这个网站,你会被问到的第一个问题是填写 Navn:(name), Email(email) 并选择你的大学。 你可以做到,因为一切正常,所以请尝试一下。

当您点击“开始溢出”(开始游戏)按钮时,您刚刚输入的数据将被插入到我的 sql 数据库中。这也有效。

然后您将被重定向到游戏,如您所见。 (使用 crome 或 firefox) IE 不适用于游戏。一旦您单击“开始溢出”,您会注意到顶部的计数器开始下降。棘手的部分来了。

我希望它将使用的时间(120 秒 - “剩余时间”)添加到用户刚刚输入的当前数据输入中。

这是柜台的代码:

var timeLeft = 120;
function decrementCounter() {
if (timeLeft > 0) {
    document.all('counter').innerHTML = "Tid tilbage " + timeLeft + "...";
    timeLeft--;
    setTimeout("decrementCounter()", 1000);
    document.getElementById("start_button").style.display = 'none';
    document.getElementById("blackout").style.display = 'none';
}
else {
    window.location = "Failed.aspx";
     }
}

如果您愿意,我将为您提供完整的解决方案。

正如我所说,一切正常,除了我不知道如何将时间添加到当前用户的数据库中。

【问题讨论】:

    标签: jquery asp.net sql


    【解决方案1】:

    Pm 求正确答案,我想你会很高兴的; )!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-08-27
      • 1970-01-01
      • 1970-01-01
      • 2020-12-04
      • 1970-01-01
      • 2016-10-04
      • 2011-05-17
      • 1970-01-01
      相关资源
      最近更新 更多