填写网页上的字段
我已经问过这个问题,但对我来说仍然太不清楚,而且似乎人们还没有理解我想要做什么,所以我会尽力说得更清楚。
本网站:https://www4.polymtl.ca/poly/poly.html 是我要填写的网站。
我希望能够做的是用文本修改“nip”、“code”和“naissance”字段的值(例如,代码为“majuif”)。
<input type=password name=code size=8 maxlength=8>
<input type=password name=nip size=8 maxlength=8>
<input type=password name=naissance size=8 maxlength=8>
但是,我不知道该怎么做。这是我的问题。
我是否应该编写另一个 HTML 文件 - 我不知道“宏”这个词是否可以用于此目的,但我很确定它可以 - 并在其中插入 JavaScript?
请注意,我不是 JavaScript 或 HTML 方面的专业人士,但我有基础知识,并且仍在学习中。
谢谢,
-马克斯。
I've already asked this question, but it's still too unclear to me, and it seems people haven't understood what I'm trying to do, so I'll try and be clearer.
This website: https://www4.polymtl.ca/poly/poly.html
is the website I want to fill.
What I would like to be able to do, is modify the values of the "nip", "code", and "naissance" fields with text (for example, code being "majuif").
<input type=password name=code size=8 maxlength=8>
<input type=password name=nip size=8 maxlength=8>
<input type=password name=naissance size=8 maxlength=8>
However, I don't know how to do that. And this is my problem.
Should I write another HTML file - I don't know if the word "macro" can be used for that, but I'm pretty sure it can - and insert JavaScript in it?
Please note that I'm not a professional in JavaScript or HTML, but I have basics, and still learning.
Thanks,
-Max.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看了你的另一个问题,你说这不是你的页面。您无法读取或写入不是由您自己的页面创建的页面。
您可以从您自己的浏览器创建指向 javascript:alert('hello world'); 的快捷方式/书签链接。或者
当浏览器中出现该页面时,点击书签。
更新
检查它需要是 getElementsByName 复数,但仍然不满意他们的 html 找不到名为 code 的输入 - getElementsByTagName 有效
注意您可以将脚本剪切并粘贴到地址中当您在页面上时。
Looked at your other question and you said it is not your page. You can not read or write to a page which is not created by your own page.
You can from your own browser create a shortcut / bookmark link to javascript:alert('hello world'); or
Then hit the bookmark when you have the page in your browswer.
Update
Checked it needs to be getElementsByName plural but still not happy about their html does not find the input named code - getElementsByTagName works
Note you can cut and paste the script into the address bar when you are on the page.