简体   繁体   中英

Styling dynamically created html elements

I am trying to add a search in page function with javascript. I was looking at this script .

It is creating the input element dynamically inside an iframe to skip the text in the search input box. I have bootstrap running on my project and the dynamic content doesn't get the bootstrap styling. How can I style the input box and submit button with bootstrap?

Use their respective id to style them(Hope you use firebug to inspect the webpage and get element details)

Ex: form#f1 input[type="text"] { backgroud-color:#222222 !important;}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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