简体   繁体   English

如何通过控制台填写网站上的电子邮件

[英]How can I fill e-mail on website via console

How can I fill e-mail via Console in Google Chrome?如何在 Google Chrome 中通过控制台填写电子邮件?

照片

I have inspected the element and results are below:我检查了元素,结果如下:

<input id="email" name="email" type="username" placeholder="Podaj swój e-mail albo numer telefonu" autocomplete="username" autocorrect="off" autocapitalize="off" spellcheck="false" required="required" maxlength="524288" minlength="4" class="form-input custom-focus">

I have tried:我努力了:

document.getElementById('email').value = 'sample@email.com';

but it do not change email on website.但它不会更改网站上的 email。

EDITed已编辑

Yesterday i use the incorrect selector:(昨天我使用了不正确的选择器:(

<script>
document.getElementById('email').value = '';
document.getElementById('email').placeholder = 'sample@email.com';
</script>

Today i checked your site and i tried to change Selector to the querySelector and it change the placeholder pretty fine.今天我检查了您的网站,并尝试将 Selector 更改为 querySelector,它可以很好地更改占位符。

document.querySelector('[type=username]').placeholder = 'sample@email.com'

the "Continue" button is not active , we should ask ourselves why he is not active? “继续”按钮没有激活,我们应该问自己为什么他没有激活? Simply because has the disabled attribute, So to active the button "Continue" we should use either:仅仅因为具有 disabled 属性,所以要激活“继续”按钮,我们应该使用:

  • by setting disabled property of submit to false:通过将 submit 的disabled属性设置为 false:
document.querySelector('[type=submit]').disabled = false;
  • or just remove the attribute by the method removeAttribute或者只是通过方法removeAttribute删除属性
document.querySelector('[type=submit]').removeAttribute('disable')

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何通过 GmailApp 检索已发送电子邮件的 ID? - How to retrieve the ID of the sent e-mail via GmailApp? 对于电子邮件验证,此代码不起作用,我可以知道原因 - For E-Mail validation this code not working can i know the reason 我如何知道输入电子邮件是否对 jquery 有价值? - how I can know if a input e-mail has value in with jquery? 右键单击电子邮件链接时如何选择innerHTML? - How can I select the innerHTML when right-clicking on an e-mail link? 如何使用JavaScript通过电子邮件发送表单的内容? - How can I send a form's contents over e-mail with JavaScript? 如何从 firebase 数据库中获取特定数据,其中键值为电子邮件? - How can I get specific data from firebase database which key value is e-mail? PHP sendmail表单正在发送空白电子邮件,如何修复Java脚本? - PHP sendmail form is sending blank e-mail, how can I fix java script? 如何使用 Angular 5 验证电子邮件 - How to validate e-mail with Angular 5 Node.js:我如何才能访问使用node-imap收到的电子邮件的“收件人”,“正文”和“发件人”字段? - Node.js: How can I just access the “To”, “Body” and “From” fields of an e-mail received using node-imap? 在网站上混淆电子邮件地址的最佳方法? - Best way to obfuscate an e-mail address on a website?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM