メインコンテンツにスキップ
リペアコミュニティに参加 - アカウントの作成

インターネットから猫の画像をダウンロードしてレンダリングするようにコンピュータプロセッサに指示する機械が読み込むことができるインストラクションです。

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