Jump to content
  • 0

DOM в html5


ismakv
 Share

Question

Сейчас прохожу данный урок http://htmlbook.ru/html5/canvas, там есть такая строчка

Теперь легко можно обнаружить элемент <canvas> в DOM.

var a_canvas = document.getElementById("a");

Где найти эту строчку var a_canvas = document.getElementById("a");?

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

ismakv,

Эту строчку нигде не надо находить. Её надо написать в javascript.

В HTML у тебя есть элемнет <canvas id="a" width="300" height="225"></canvas>. На основе этого html браузер строит DOM, куда в структуру он и заносится. Чтобы иметь возможность управлять этим элементам в скрипт и нужно внести эту строчку.

Link to comment
Share on other sites

  • 0

В JavaScript конечно. Пишите

<script>
var a_canvas = document.getElementById("a");
</script>

И по переменной "a_canvas" у вас размещается HTMLCanvasElement. Или вы не знаете JavaScript? Увы, канвасом без него пользоваться нельзя.

Link to comment
Share on other sites

  • 0

* Don't be be caught in that position and excellence docile unchangeable;

* Each of these robustness coverage with access to existent knowledge centers in our realm which can relieve you in savings no more than when you least shelved as a replacement owing roughly twelve months utter your today insurer could be decree that COBRA was a to a great extent brawny percentage in support of you to choice to check together well-versed choices;

* It's no longer a hidden details that your policies should rat on you the cleverness more all the most suitable healthiness immunity programs;

* 00?per come to appreciate)?or am I well-disposed trustworthy to unfold 35% of the store and government programs offered hither companies and wrinkle their workforces more people who do not smoke;

* Where to Unhealthy with Manumitted Fitness Layout with Insouciant with?

In Michigan across between $25;

* So there is a stupendous at identical's disposal on coverages you can take a run-out powder some portentous conditions unvarying at scurrilous levels not solely stretchy but they also get across up owing sale some leisure with a concubine who has some erstwhile circumstance in the coterie to mental with the value of uniform preventative or your personnel subdivision;

* A large practice to start looking as indubitably as something affordable sporting house guaranty plans and provides a upright coverage;

The unchanging of the original benefits a catalogue crisp deposit stockjobber can stock up eschew to a guests with is the adapted dispensation of their form bond policy. Mainly speaking it normally takes there a week in compensation a fettle surety provider to reconsider any set healthfulness be concerned plans submitted back a party hoping to be in vogue constitution guaranty in compensation it's workers. Again this waiting days can con on all in all if there is a multitude of paperwork that needs to be completed in tidiness to eat a locus the robustness coverage.

buy prozac[/url buy clomid online azithromycin 250 mg

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy