주요 콘텐츠로 건너뛰기
수리 커뮤니티 가입 - 계정 만들기

컴퓨터 프로세서가 인터넷에서 고양이 이미지를 다운로드하고 표현하도록 지시하는 컴퓨터 판독 가능 지침.

Is my code wrong on my javascript

My code must be wrong because i keep getting an error that says "Illegally formed XML syntax. (line 5, file "Code")"

Heres my code

<FORM>

<INPUT TYPE="button"

VALUE="click here to add a game"

onClick="parent.location='mailto:1637206@student.ucps.k12.nc.us?su... would like to add a game to the website'">

</FORM>

답변되었습니다! 답변 보기 저도 같은 문제가 있습니다

좋은 질문입니까?

점수 0
댓글 달기

답변 1개

선택된 해법

Hi Andrew

So ,i tried yout code, and it did work, but i did see some syntax issues.

In most cases if you make one or two small mistakes in HTML, the browser 'fixes' it for you.

The 'mistakes' i saw are:

1. The button doesnt termintate. For each HTML element, it needs to terminate, ie. open, and close.

There are 2 ways to do this.

<tag id="tag1">somestuff</tag> (open and close )

<tag id="tag2" /> (self closing)

You seem to close the FORM element with a "</FORM>" at the bottom, but you never self closed the "INPUT" element.

2. It might not be the cause, but it should be addressed, is that you dont have any HTML tags either.

All html documents need to start and end with <html>...</html>

And should also contain a header, and body elements.

Here is your code, with my small modifications:

<html>

<head>

</head>

<body>

<FORM>

<INPUT TYPE="button"

VALUE="click here to add a game"

onClick="parent.location='mailto:1637206@student.ucps.k12.nc.us?su... would like to add a game to the website'" />

</FORM>

</body>

</html>

I hope this helps

Ian

PS, For more info, try using the W3Schools website: http://www.w3schools.com/html/

이 답변이 도움이 되었나요?

점수 1
댓글 달기

답변을 추가하세요

Andrew Goodson 영원히 감사할 것입니다.
조회 통계:

지난 24시간: 0

지난 7일: 1

지난 30일: 2

전체 시간: 293