登录 | 注册 | FAQ
Anonymous

Scripts in HTML

+ 发表回复

8 篇帖子 分页: 1 / 1


Scripts in HTML

iDana » 周二 11月 02, 2010 7:20 am

Do you write your scripts separetaly and insert them into HTML?
头像

iDana

  • 帖子: 60
  • 注册: 周二 10月 26, 2010 10:05 am
--
iDana

Re: Scripts in HTML

Malik » 周二 11月 02, 2010 12:59 pm

Can you be more specific in what kind of scripts?
头像

Malik

  • 帖子: 12
  • 注册: 周日 10月 31, 2010 8:09 pm

Re: Scripts in HTML

HTML.net » 周二 11月 02, 2010 4:48 pm

For a site like HTML.net I use a lot of including:

- I have one external style sheet
- I use PHP to include the menus, ads, footer etc.
- I have a few javascripts included as well.

This makes it a lot easier to update the website: I can add a new menu item on all pages by updating only one file. Or change background color on all pages again by updating only one file. Or implement new ads on the whole webiste with a single update. Etc.

- Andreas, HTML.net
头像

HTML.net
Site Admin

  • 帖子: 1194
  • 注册: 周六 9月 11, 2010 11:24 am
--
Show some love for HTML.net on Twitter, Facebook and Google: Use the buttons on top of all pages.

Re: Scripts in HTML

iDana » 周二 11月 02, 2010 5:30 pm

HTML.net 写道:For a site like HTML.net I use a lot of including:

- I have one external style sheet
- I use PHP to include the menus, ads, footer etc.
- I have a few javascripts included as well.

This makes it a lot easier to update the website: I can add a new menu item on all pages by updating only one file. Or change background color on all pages again by updating only one file. Or implement new ads on the whole webiste with a single update. Etc.

Thanks Andreas but do you do your scripts on note pad or what do you use?

- Andreas, HTML.net
头像

iDana

  • 帖子: 60
  • 注册: 周二 10月 26, 2010 10:05 am
--
iDana

Re: Scripts in HTML

HTML.net » 周二 11月 02, 2010 7:05 pm

My favorite editor is Editplus - which is a simple text editor but with syntax highlighting.

- Andreas, HTML.net
头像

HTML.net
Site Admin

  • 帖子: 1194
  • 注册: 周六 9月 11, 2010 11:24 am
--
Show some love for HTML.net on Twitter, Facebook and Google: Use the buttons on top of all pages.

Re: Scripts in HTML

jaantjezensis » 周三 11月 03, 2010 11:50 am

The <script> tag is used to define a client-side script, such as a JavaScript.
The script element either contains scripting statements or it points to an external script file through the src attribute.
The required type attribute specifies the MIME type of the script.
Common uses for JavaScript are image manipulation, form validation, and dynamic changes of content.
<script type="text/javascript">
document.write("Hello World!")
</script>
头像

jaantjezensis

  • 帖子: 4
  • 注册: 周三 11月 03, 2010 4:29 am

Re: Scripts in HTML

Zachariahbroune » 周四 12月 02, 2010 10:22 am

<html>
<body>

<script type="text/javascript">
document.write("Hello World!")
</script>
<noscript>Welcome,/noscript>

<p>New Wolrd is so BeautifulmYou like it.</p>

</body>
</html>
头像

Zachariahbroune

  • 帖子: 5
  • 注册: 周四 12月 02, 2010 6:25 am

Re: Scripts in HTML

Jacintarayenz » 周二 12月 28, 2010 7:48 am

<script type="text/javascript">
document.write("Hello World!")
</script>
<noscript>Sorry, your browser does not support JavaScript!</noscript>
头像

Jacintarayenz

  • 帖子: 5
  • 注册: 周二 12月 28, 2010 5:22 am


+ 发表回复

分页: 1 / 1