【发布时间】:2019-08-01 16:54:36
【问题描述】:
我正在尝试制作某种日历,我可以在其中输入一些任务我已经有了设计模板但我希望能够在按下按钮时添加一个新表(天)。
在上图中你可以看到我想要做什么。 这是我正在使用的模板:
HTML
<tr>
<th>
<div class="dls">
<div class="select">
<select name="dls" id="dls">
<option value="1" selected="selected">Monday</option> <option value="2">Tuesday</option> <option value="3">Wednesday</option> <option value="4">Thursday</option> <option value="5">Friday</option> <option value="6">Saturday</option> <option value="7">Sunday</option>
</select>
</div>
</div>
</th>
</tr>
<tr>
<td>
<input type="text" name="publisher" form="pubName">
<input type="text" name="publisher" form="pubName">
<input type="text" name="publisher" form="pubName">
<input type="text" name="publisher" form="pubName">
</td>
</tr>
CSS
body { font-size: 13px; }
.dls { font-size: 13px; text-align: center; background: transparent; border: none; border-radius: 6px; overflow: hidden; position: relative; }
.dls .select{ height: 22px; width: 125px; background-position: center; text-align: center; }
.dls .select select{ background: transparent; line-height: 1; border: 0; padding: 0; border-radius: 0; width: 125px; height: 22px; position: relative; z-index: 10; font-size: 13px; color: #ffffff; }
table th { text-align: center; background-color: #006fc4; border: 1px solid #006fc4; color: #fff; width: 128px; height: 22px; }
table td { text-align: center; border: 1px solid #006fc4; padding: 2px 2px; width: 128px; height: 22px; }
ul { list-style-type: none; } input { text-align: center; width: 125px; height: 22px; font-size: 13px; }
【问题讨论】:
-
你需要通过 JavaScript 阅读一些关于 DOM manipulation 的教程。
标签: javascript html css javascript-objects dom-events