Потребителски вход

Запомни ме | Регистрация
Постинг
10.05.2016 14:11 - examples
Автор: sparty Категория: Технологии   
Прочетен: 336 Коментари: 0 Гласове:
0



              document.write("Hello World!"); function Warn() {                alert ("This is a warning message!");                            } function getConfirmation(){                var retVal = confirm("Do you want to continue ?");                if( retVal == true ){                   document.write ("User wants to continue!");                   return true;                }                else{                   document.write ("User does not want to continue!");                   return false;                }             } function getValue(){                var retVal = prompt("Enter your name : ", "your name here");                document.write("You have entered : " + retVal);             } function js_style()  { //font styles added by JS: text.style.fontSize = "14pt"; text.style.fontFamily = "Comic Sans MS"; text.style.color = "blue"; }   function Msg1(){ document.getElementById("myText").innerHTML = "Thanks!"; } function Msg2(){ document.getElementById("myText").innerHTML = "Try message 1 again..."; } function showMsg(){  var userInput = document.getElementById("userInput").value;  document.getElementById("userMsg").innerHTML = userInput; } function changeColor(){  var newColor = document.getElementById("colorPicker").value; document.getElementById("colorMsg").style.background = newColor; } if(document.images){                var image1 = new Image(); // Preload an image                image1.src = "images/web_development.jpg";                var image2 = new Image(); // Preload second image                image2.src = "images/web.jpg";             }    
Alert Dialog Box.  

Click the following button to see the result:

                            
Confirmation Dialog Box.

Click the following button to see the result:

                            
Prompt Dialog Box.

Click the following button to see the result:

                            
JavaScript DOM paragraph style

Web Technologies - JavaScript Exercises

Style
Basic innerHTML Example


innerHTML With User Input


Formatting with getElementById Choose a background color...  None Yellow Salmon Light Blue Lime Green
Rollover with Mouse Events

Move your mouse over the image to see the result

                   image      



Гласувай:
0



Следващ постинг
Предишен постинг

Няма коментари
Търсене

За този блог
Автор: sparty
Категория: Рецепти
Прочетен: 17323
Постинги: 34
Коментари: 0
Гласове: 5
Архив
Календар
«  Април, 2024  
ПВСЧПСН
1234567
891011121314
15161718192021
22232425262728
2930