我正在尝试创建一个简单的应用程序,将输入的值写入控制台上的表单:
HTML:
<input type="email" name="email-address" value="" id="email-address" />
<label for="password">Password</label>
<input type="password" name="password" value="" id="password" />
<input type="submit" name="submit" class="btn" value="Login" onclick="login_existing_submit()" id="register-submit" />
Javascript:
function login_existing_submit() {
console.log(document.getElementById("email-address").value);
}