Một thẻ đã tồn tại với tên chi nhánh được cung cấp. Nhiều lệnh GIT chấp nhận cả tên thẻ và tên chi nhánh, vì vậy việc tạo nhánh này có thể gây ra hành vi bất ngờ. Bạn có chắc là bạn muốn tạo chi nhánh này?
Tôi khá mới với JavaScript và tôi phải thực hiện một bài kiểm tra cá tính. Tôi cần bài kiểm tra chỉ là JavaScript, không có jQuery. Tôi cần thực hiện mỗi tùy chọn trả lời có thể nhấp và chỉ hiển thị một câu hỏi tại một thời điểm. Cũng như tìm cách lưu trữ mỗi câu trả lời để hiển thị kết quả. Tôi không chắc chắn bắt đầu từ đâu với điều này và tôi đã gặp một chút rắc rối. Điều này có vẻ ngớ ngẩn, nhưng tôi thực sự thích một số trợ giúp trong việc xem tôi đã sai ở đâu và làm thế nào tôi có thể sửa nó. Dưới đây là những gì tôi đã làm cho đến nay với HTML, CSS và JavaScript. Cảm ơn trước
var startButton = document.getElementById["startButton"];
startButton.addEventListener["click", startClick];
function startClick[] {
var intro = document.getElementById["intro"];
intro.style.display = "none";
startButton.style.display = "none";
var question1 = document.getElementById["question1"];
question1.style.display = "block";
}
var answerButton = document.getElementsByTagName["li"];
answerButton[0].addEventListener["click", answerClick];
console.dir[answerButton];
function answerClick[eventObject] {
var eventClick = eventObject.target;
var question = document.getElementsByClassName["question"];
for[i= 0; i < question.length; i ++]; {
question[i].style.display = "block";
}
}
@charset"UTF-8";
/* CSS Document */
html, body, div, span, applet, object, iframe, h2, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1.5;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after, q:before, q:after {
content:'';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
/*above is Eric Meyer CSS reset*/
#titleimage {
width: 100%;
padding-top: .5%;
padding-bottom: .5%;
}
#titleimage img {
max-width: 100%;
}
.question, #results {
display: none;
}
p {
font-family:'Helvetica';
font-size: 1.7em;
font-weight: 100;
text-align:center;
padding: 1em;
}
h3 {
font-family:'Helvetica';
font-size: 1.7em;
font-weight: 150;
text-align:center;
}
h2 {
font-family:'Helvetica';
font-size: 1.5em;
font-weight:200;
text-align:center;
}
.button {
margin: 0.5em;
padding: 0.5em;
text-align:center;
}
.button:hover {
text-decoration: underline;
}
.question li {
border: 1px solid;
margin: 0.5em;
padding: 0.5em;
font-family:'Helvetica';
font-size: 1.5em;
text-align:center;
background-color: #ADDEF4;
}
.question li:hover {
text-decoration: underline;
}
#results img {
padding-left: 30%;
padding-right: 30%;
}
Take the quiz to see which Parks and Rec character is most like you!
Let's get started!
What is your favourite food?
- Breakfast Food
- Waffles
- Calzones
- Vegan Superfoods
What do you enjoy doing in your spare time?
- Woodwork in solitary
- Work!
- Make stop motion 'movies'
- Run!
What would you do on "treat yo'self" day?
- Buy a Batman suit and be Batman
- Go to my lakehouse by myself
- Treat myself to waffles and friends
- Run! Or maybe some yoga
What are you likely to be doing on a Friday night?
- Cooking vegan hamburgers
- Being alone, maybe with some Scotch
- Still working or hanging out with my bestie
- Watching Game of Thrones
What do you find funny?
- Accounting puns
- The Government
- Myself
- You can laugh at anything!
You get Leslie Knope!
You got Ron Swanson!
You got Ben Wyatt!
You got Chirs Traeger!