Programming in Jscript. Net masatoshi Natsume
Yüklə
58 Kb.
tarix
07.11.2018
ölçüsü
58 Kb.
#78685
Programming in Jscript.NET
Masatoshi Natsume
Jscript
Script language
developed by Microsoft
Compatible with JavaScript
Netscape
Communication
Sun Microsystems
Extensions
File
operation
Component Object Module (COM)
Embedded in HTML
Jscript.NET
Current version of Jscript
Compatible
with Jscript
Supports .NET framework
Jscript.NET
needs to be compiled
Jscript.NET has higher performance
Declare Jscript
Sample
[Program code]
Hello World!!
dd = new Date();
document.write(dd.toLocaleString());
document.write("
");
document.write("Hello World!!");
View
in browser
Loading Script File
Text Field
Text Filed
function check()
{
txt = document.myFORM.myTEXT.value;
if (txt == ""){
alert("Text field is empty");
}else{
alert("Entered: " + txt)
}
}
Radio Button
Radio Button
var msg;
function rdo_Change(obj){
msg = obj.value;
}
function func3(obj){
alert("My favorite fruit is " + msg);
}
Please
select your favorite fruits
Apple
Banana
Pineapple
Orange
Check Box
Check BOx
function func5(){
var cnt=0;
var i;
for (i =0; i< document.frm5.elements.length;i++){
if(document.frm5.elements[i].checked)
cnt++;
}
alert (cnt + " CheckBoxes are selected" + "\n" +
"CheckBox1 checked: " + document.frm5.elements[0].checked + "\n" +
"CheckBox2 checked: " + document.frm5.elements[1].checked + "\n" +
"CheckBox3 checked: " + document.frm5.elements[2].checked + "\n" +
"CheckBox4 checked: " + document.frm5.elements[3].checked);
}
Check1
Check2
Check3
Check4
Conclusion
Jscript.NET is an easy language like VB.NET
The compatibility with JavaScript is not perfect
Jscript.NET has attractive features.
QUESTIONS?
Yüklə
58 Kb.
Dostları ilə paylaş:
Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©genderi.org 2024
rəhbərliyinə müraciət
Ana səhifə
Psixologiya