VRMLÓëJavascriptºÍVBscript½»»¥µÄʵÀý
ÏÖ½«´úÂëÌù³ö£¬¹²Ã㣡
HTML²¿·Ö£º=====================================================
<html>
<head>
<script language="VBscript">
<!--
function M_b()
set M_e=Scene.Engine
M_e.Nodes("MyScript").Fields("nodestring")="Shape {geometry Box{}}"
M_e.Nodes("MyScript").Fields("kk")=TRUE
end function
function M_s()
set M_e=Scene.Engine
M_e.Nodes("MyScript").Fields("nodestring")="Shape {geometry Extrusion{}}"
M_e.Nodes("MyScript").Fields("kk")=TRUE
end function
!-->
</script>
<script language="javascript">
function bd() {
var oo = Scene.Engine;
oo.Nodes("MyScript").Fields("nodestring")="Shape {geometry Box{}}";
oo.Nodes("MyScript").Fields("kk")=true;
}
function bx(){
var oo = Scene.Engine;
oo.Nodes("MyScript").Fields("nodestring")="Shape {geometry Extrusion{}}";
oo.Nodes("MyScript").Fields("kk")=true;
}
</script>
</head>
<body>
<OBJECT id="Scene"
CLASSID="CLSID:86A88967-7A20-11d2-8EDA-00600818EDB1" WIDTH="300" HEIGHT="300">
<PARAM NAME="Scene" value="box.wrl">
</OBJECT>
<input type=button value="±ä´ó" onClick="bd()">
<input type=button value="±äС" onClick="bx()"><br>
</body>
</html>
box.wrl²¿·Ö===========================================================
#VRML V2.0 utf8
DirectionalLight {
ambientIntensity .5
intensity .2
}
NavigationInfo {
type "EXAMINE"
}
DEF Transfm Transform {
translation -4 0 -4
children [
Shape {
geometry Box{}
}]
}
DEF MyScript Script {
directOutput TRUE
eventIn SFBool kk
field SFNode node USE Transfm
field SFString nodestring ""
url "VRMLSCRIPT:
function kk(){
if(nodestring=='')
{
nodestring='Shape {'
'geomet
Ïà¹ØÎĵµ£º
1. oncontextmenu="window.event.returnValue=false" ½«³¹µ×ÆÁ±ÎÊó±êÓÒ¼ü
<table border oncontextmenu=return(false)><td>no</table> ¿ÉÓÃÓÚTable
2. <body onselectstart="return false"> È¡ÏûÑ¡È¡¡¢·ÀÖ¹¸´ÖÆ
3. onpaste="return false" ²»×¼Õ³Ìù
4. oncopy="return false;" oncut="re ......
´óÒ»µãµÄ¿ò¼Ü¶¼ÓÐÕâ¸ö¶«Î÷¡£PrototypeÔÀ´µÄ¼Ì³Ð»úÖƷdz£Èõ£¬ÎªÁËÓëmootools¶Ô¿¹Ò²Ç¿»¯ÁËÕâÒ»·½Ãæ¡£ÂҪÓÃÔÐͼ̳ÐÀ´Ä£·ÂÀà¼Ì³Ð£¬¶¼»ù±¾´æÔÚÒ»¸ö¿Ë¡º¯Êý¡£°Ñ¸¸ÀàµÄÔÐÍÊôÐÔ¸´ÖƵ½×ÓÀàÉÏÈ¥¡£ÀíÄîµÄ¶«Î÷ÔÝʱÕâô¶à£¬¶¯ÊÖʵ¼ùÒ»ÏÂ×îʵ¼Ê¡£ÎÒÃÇÉè¼ÆÒ»¸öÊý×éÀ࣬ӵÓÐÔÉúÊý×éµÄÄÜÁ¦ÓëÐÂÀ©Õ¹µÄÄÜÁ¦¡£
var isNumber ......
ÎÒÃÇÀ´Ä£·ÂÒ»ÏÂ×îOOµÄmootoolsµÄ¼Ì³Ð»úÖÆ¡£ËüµÄÀ඼ÓÐÒ»¸ö½Ð×öinitialize¹¹Ôì·½·¨£¬ÕâÓëJavaµÄÀ඼ÓÐÒ»¸öÓëÀàÃûͬÃûµÄ¹¹Ôì·½·¨Ò»ÑùµÄµÀÀí¡£Ö»²»¹ý£¬ÕâЩ½Ðinitialize»òinit¶¼Êǽè¼ø×ÔPrototype£¬¶øPrototypeÄÇ°ïÈËÊÇRuby³öÉí¡£ÎªÁËÇø±ðmootoolsÄÇÖÖÎÛȾÔÉú·½·¨µÄ×ö·¨£¬ÎÒ°ÑÀàµÄ¹¹ÔìÆ÷ÃüÃûΪvariant£¬²¢ÇÒ½ûÖ¹²é¿´¹¹Ô ......
var Class = {
¡¡create: function() {
¡¡¡¡return function() {
¡¡¡¡¡¡this.initialize.apply(this, arguments);
¡¡¡¡}
¡¡}
}
¡¡¡¡ÕâÊÇprototype.jsÀïÃæµÄÀ๹Ôì·½·¨£¬Ê¹Ó÷½·¨ÊÇ£º
¡¡¡¡var myClass = Class.create();
¡¡¡¡ÕâÑù¾Í¿ÉÒÔ´´½¨Ò»¸öÀàÁË¡£
¡¡¡¡¼ÌÐø¼ÓÈ룺
myClass.prototype =
{
¡¡x : func ......
1. oncontextmenu="window.event.returnValue=false" ½«³¹µ×ÆÁ±ÎÊó±êÓÒ¼ü
<table border oncontextmenu=return(false)> <td>no </table> ¿ÉÓÃÓÚTable
2. <body onselectstart="return false"> È¡ÏûÑ¡È¡¡¢·ÀÖ¹¸´ÖÆ
3. onpaste="return false" ²»×¼Õ³Ìù
4. oncopy="return false;" oncut="re ......