ورود

View Full Version : جاوا اسکریبت(؟)



ehsan.pn2
یک شنبه 08 خرداد 1384, 01:10 صبح
میشه به من بگین که کدهای جاوا اسکریپت رو در وبلاگ کجا باید به کار برد که جواب بدن؟ :flower:

rezaTavak
یک شنبه 08 خرداد 1384, 07:10 صبح
سلام

اولا اینجا بخش جاوا است و با جاوا اسکریپت فرفهای زیادی داره.


در جوابتون هم باید بگم بایستی یک شروع برای توابعتون بگذارید با

<Script =jScript>


و کدتون را در آن تایپ و با



</Script>



اون را ببندید.


از تابعهاش هم به موقع خودشون استفاده کنید.

M-Gheibi
یک شنبه 08 خرداد 1384, 07:51 صبح
به بخش مباحث مربوط به JavaScript ، HTML و VBScript منتقل شد.
<p align="left" dir="ltr">Where to Put the JavaScript

Scripts in a page will be executed immediately while the page loads into the browser. This is not always what we want. Sometimes we want to execute a script when a page loads, other times when a user triggers an event.

Scripts in the head section: Scripts to be executed when they are called, or when an event is triggered, go in the head section. When you place a script in the head section, you will ensure that the script is loaded before anyone uses it.


&lt;html>
&lt;head>
&lt;script type="text/javascript">
some statements
&lt;/script>
&lt;/head>
Scripts in the body section: Scripts to be executed when the page loads go in the body section. When you place a script in the body section it generates the content of the page.


&lt;html>
&lt;head>
&lt;/head>
&lt;body>
&lt;script type="text/javascript">
some statements
&lt;/script>
&lt;/body>
Scripts in both the body and the head section: You can place an unlimited number of scripts in your document, so you can have scripts in both the body and the head section.

&lt;html>
&lt;head>
&lt;script type="text/javascript">
some statements
&lt;/script>
&lt;/head>
&lt;body>
&lt;script type="text/javascript">
some statements
&lt;/script>
&lt;/body>
</p>
http://www.w3schools.com/js/js_whereto.asp

ehsan.pn2
جمعه 13 خرداد 1384, 11:49 صبح
با سلام :flower:
:گیج: من یه وبلاگ دارم ، اگه بخوام از کدهای جاوا اسکریبت برای طراحی اون استفاده کنم باید کدها رو تو قسمت html در این تگ قرار بدم و وبلاگ رو باز سازی کنم؟؟؟ :گیج:

3nitro
جمعه 13 خرداد 1384, 18:46 عصر
معمولا کدها بین دو تگ html هست . همچنین بستگی به نوع کدتون داره . مثلا تابع قرار تعریف کنید یا مثلا میخواین در قسمتی از صفحه چیزی بنویسید . توضیحات کامل در این مورد رو دوستان در بالا دادم . بازسازی وبلاگ هم من فقط تو پرشین بلاگ دیدم . :D

ehsan.pn2
شنبه 14 خرداد 1384, 00:49 صبح
:thnx:

ehsan.pn2
شنبه 14 خرداد 1384, 14:50 عصر
من این کار رو انجام دادم ولی جواب نداد :(
:گیج: تو قسمت مدیریت کاربر وقتی این کد ها رو می نویسم در قسمت پیش نمایش جواب می ده ولی وقتی اونو بازسازی می کنم جواب نمی ده :گیج: ؟؟ چرا ؟؟ :گیج:
:sorry: :mad:

Masuod
پنج شنبه 19 خرداد 1384, 02:07 صبح
کد؟کدت چیه؟...اینجا بنویس اگه که امکان داره... تا بشه گفت هر قسمتش رو بین کدام تگها بگزاری.. :confy2: