小编Ben*_*Ben的帖子

document.getElementById("remember").visibility ="hidden"; 不在复选框上工作

我不能让这些visibilitydisplay属性工作.

这是HTML页脚:

<div id="footer">
  &copy; 
  <strong id="foot" onmouseover="showData();" onmouseout = "hideData()">
    Exquisite Taste 2012
  </strong>
  <input type='checkbox' id="remember" onclick='editCookie()' style="visibility:hidden;" />
</div>
Run Code Online (Sandbox Code Playgroud)

这是.js函数,可见性部分不起作用:

function showData()
{


  document.getElementById("remember").visiblity="visible";


  document.getElementById("foot").innerHTML = getDate() + "  " + getTime();

  if(cookieValue())
  {
    document.getElementById("remember").checked = true;
  }
}
Run Code Online (Sandbox Code Playgroud)

这一行似乎没有做任何事情:

document.getElementById("remember").visiblity="visible";
Run Code Online (Sandbox Code Playgroud)

javascript visibility

11
推荐指数
2
解决办法
13万
查看次数

如何调用函数内的函数?

如何调用此函数内部的函数?

var video = function() {

    this.name = "Name of Video";
    this.desc = "Short Description of Video";
    this.long = "Long Description of Video";

    function metadata(){
        return {
            name : this.name,
            shortDescription : this.desc,
            longDescription : this.long
        };
    };

};
Run Code Online (Sandbox Code Playgroud)

javascript

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

如何在XAMPP v3.2.1中为Apache添加别名?

我在httpd.conf文件中添加了一个别名来访问我的文件夹localhost/projects:

<IfModule alias_module>

    Alias /projects "C:/Users/Ben/Google Drive/Projects"

    <Directory "C:/Users/Ben/Google Drive/Projects">
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        Allow from all
        Require all granted
    </Directory>

    ScriptAlias /cgi-bin/ "C:/xampp/cgi-bin/"

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

当我尝试在XAMPP 3.2.1中启动Apache时,没有任何内容写入error.log并且Apache无法启动.

php apache xampp

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

CryptoStream:为什么要加密CryptoStreamMode.Write和要解密的CryptoStreamMode.Read?

设e ='password',我在CryptoStream中将其转换为'as9kio0736'.

设d ='as9kio0736',我将其转换为'CryptoStream中的密码'.

当我将d转换回'password'时,为什么不考虑在CryptoStream中写入?

using (MemoryStream msEncrypt = new MemoryStream()) {
    using (CryptoStream csEncrypt = new CryptoStream(msEncrypt, encryptor, CryptoStreamMode.Write)) {
        using (StreamWriter swEncrypt = new StreamWriter(csEncrypt)) {
            swEncrypt.Write(plainText);
        }
    }
}

using (MemoryStream msDecrypt = new MemoryStream(cipherText)) {
    using (CryptoStream csDecrypt = new CryptoStream(msDecrypt, decryptor, CryptoStreamMode.Read)) {
        using (StreamReader srDecrypt = new StreamReader(csDecrypt)) {
            plaintext = srDecrypt.ReadToEnd();
        }
    }
}
Run Code Online (Sandbox Code Playgroud)

c# encryption cryptostream

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

"未捕获的SyntaxError:意外的令牌("在简单的函数中

我收到此错误:

未捕获的SyntaxError:意外的令牌(

当我没有注释掉这个功能时:

function setTextField(str)
{
        if ( (str == "") ||  (str == null) ) 
          str = "Enter Task Here";
        document.getElementById.("get_subject").value = str;
}
Run Code Online (Sandbox Code Playgroud)

我试图从其他地方(稍后在代码中)执行此操作:

setTimeout('setTextField();', 1000);
Run Code Online (Sandbox Code Playgroud)

为什么我收到此错误?

javascript function syntax-error

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

通过方法传递的变量"找不到符号"

截图显示错误

为什么在引用通过构造函数传递的变量时出现错误?

这是完整的Customer.java类:

import java.sql.ResultSet;
import javax.servlet.http.HttpServletRequest;

public class Customer {

    // SQL Variables
    private final String URL = "jdbc:mysql://localhost/books";
    private final String USER = "root";
    private final String PASSWORD = "P@ssw0rd1";

    // Class Variables
    int CustomerID;
    String customerEmail;
    String customerPassword;
    String customerFirstName;
    String customerLastName;
    String customerAddress;
    String customerCity;
    String customerProvince;
    String customerPostalCode;
    String customerPhoneNumber;
    String customerCreditCardNumber;
    String customerExpiryDate;
    String customerCreditCardType;

    // Class Constructors
    public Customer(int customerID) // Constructor for an Existing Customer
    {
        ResultSet customerData = MySQLQuery("select * from Customers …
Run Code Online (Sandbox Code Playgroud)

java constructor netbeans compiler-errors

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

为什么我不能将整数转换为枚举

我试图从我已经确认等于的DataGridViewRow单元格值中转换一个整数 0

AddedTask.Status = (TaskStatus) row.Cells["status"].Value;

Visual Studio中的InvalidCastException

这是创建Task对象和TaskStatus Enum的代码.

class Task
{
    public string Description { get; set; }

    public TimeSpan Duration
    {
        get
        {
            if (BeginDate == DateTime.MinValue) // BeginDate has not been set
                return new TimeSpan(0, 0, 0);
            else if (EndDate == DateTime.MinValue)
                return DateTime.Now.Subtract(this.BeginDate);
            else
                return this.EndDate.Subtract(this.BeginDate);
        }
    }

    public DateTime BeginDate { get; set; }
    public DateTime EndDate { get; set; }
    public TaskStatus Status { get; set; }

    public Task()
    {
        this.Description = string.Empty;
        this.BeginDate = …
Run Code Online (Sandbox Code Playgroud)

c# enums

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