<style>
body {background:#aaa; margin:0;
}
#d_all {background:white;width:90%;margin-left:auto; margin-right:auto;margin-top:3px;margin-bottom:3px;}
#d_left {width:195px;float:left;background:white;text-align:left}
#d_right {margin-left:195px;background:white; width: 100%; text-align: left}
</style>
<table id="d_all">
<tr>
<th id="d_left">
1<br> 1<br> 1<br> 1<br> 1<br>
</th>
<th id="d_right">
12<br>
</th>
</tr>
</table>
const contact_btn = document.querySelector('#cms_contacts'); // id
const block = document.querySelector('.block'); // class
const sub_contacts = document.querySelector('.header_sub_cms_contacts'); //class
<block></block>
<div class="block"></div>
export interface Content {
type: "text" | "video" | "header" | "code" | "images" | "remark" | "materials";
}
export interface ITextContent extends Content {
value: string;
}
export interface Post {
title: string;
content: ITextContent[]
}
// ...
const items:Post = {
title: "foo bar",
content: [
{type: "text", value: "lorem 1"},
{type: "video", url: "lorem 2"},
{type: "text", value: "lorem 3"}
// ...
]
};
const onlyTextType:ITextContent[] = items.content.filter(({type}) => type === "text");
document.getElementById('div1').innerHTML =
'<input type="text" name="text1" class="form-control w-50"/>';
document.getElementById('div1').innerHTML +=
'<input type="text" name="text1" class="form-control w-50"/>';