简体   繁体   English

如何更改网页texbox的大小?

[英]How to change size of texbox of webpage?

I am trying to make a chrome extension. 我正在尝试扩展Chrome。 I am having 2-3 problems which I would like to discuss. 我有2-3个问题要讨论。

I want to change the size of textbox of facebook chatbox shown in right bottom corner. 我想更改右下角显示的Facebook聊天框的文本框的大小。

So I am using javascript(not jquery). 所以我使用的是javascript(不是jquery)。 I did inspect element in chrome browser and got "_552h" classname for its div element. 我确实在chrome浏览器中检查了元素,并为其div元素获取了“ _552h”类名。

Afterthis, I wrote alert(document.getElementsByClassName("_552h")); 之后,我写了alert(document.getElementsByClassName(“ _ 552h”)); in content_scripts which runs for facebook page. 在针对Facebook页面运行的content_scripts中。 This showed me [objectHTMLcollection] in alert box. 这在警报框中显示了[objectHTMLcollection]。 This was just for testing so to see if I was accessing the element. 这只是用于测试,以便查看我是否正在访问该元素。

Then how should I access the textbox inside this div and access its css change height of textbox? 那么我应该如何访问该div内的文本框并访问其CSS更改文本框的高度? Please show me through code, as I am beginner. 我是初学者,请通过代码向我展示。

Also after this I would like to add one horizontal list of suggestion words for this textbox. 同样在此之后,我想为此文本框添加一个水平的建议单词列表。 So I tried to use jquery autcomplete which shows autocomplete but in vertical dropdown. 所以我尝试使用显示自动完成但在垂直下拉列表中的jQuery autcomplete。 So what kind of css would I require? 那么我需要什么样的CSS?

Also tell me if I can get english dictionary words list for this autocomplete source. 还告诉我是否可以获取此自动完成源的英语词典单词列表。

For CSS I might be able to help 对于CSS,我也许可以提供帮助

for Textarea, you can style as below 对于Textarea,您可以按照以下方式设置样式

._552h textarea{ some style here...}

For input text you can style as 对于输入文本,您可以将样式设置为

._552h input[type='text']{ some style here...}

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM