日期:2014-05-16 浏览次数:20356 次
<a href="javascript:alert('点击这个超级链接。就出现这行字。其实么有什么用,一个特例而已')"></a>
<script type="text/javascript" language="javascript"> var x; if (x == null) { alert("null"); } if (typeof (x) == "undefined") { alert("undefined"); } if (!x) { alert("kong"); } </script>
<script type="text/javascript" language="javascript"> function add(i1, i2) { return i1 + i2; } </script>
var r = add(1, 2); alert(r); var m = add("nihao", "zhonguo"); alert(m);
<script type="text/javascript" language="javascript"> var f1 = function (i1, i2) { return i1 + i2; }; alert(f(3, 4)); alert(function add(i1, i2) { return i1 + i2; } (12,23)); //底下这个也是可以的 </script>
<script type="text/javascript" language="javascript"> function con() { if (confirm("是否正确")) { alert("yes"); } else { alert("no"); } } </script>
<asp:Button ID="Button1" runat="server" Text="Button" OnClientClick="con()"/> <%--<input id="Button2" type="button" value="button" onclick="con()"/>--%>
<asp:Button ID="Button1" runat="server" Text="Button" OnClientClick='navigate("11111.aspx")'/> -----这个没有起作用 <input id="Button2" type="button" value="button" onclick='navigate("222222.aspx")'/>---对的
<script language="javascript" type="text/javascript"> var m = typeof 123 alert(typeof m); </script>