JavaScript不区分" '
JavaScript不区分单个字符和字符串,任何字符或字符串可以用双引号或单引号引起来。如果字符串本身含有双引号,则应使用单引号将字符串括起来;如果字符串本身含有单引号,则应使用双引号将字符串引起来,两者可以嵌套使用。
相关文档:
Javascript关闭当前窗口2007-09-03 11:11这个太简单了,window.close()就可以了; 不过它会出个提示“您查看的网页正在试图关闭窗口。是否关闭窗口?”,能不能不出这个提示?N年前就有人问过我,那时候我还是菜鸟,不过我的回答还算“专业”。呵呵; “如果你第一次打开这个网页,window.close() ......
问:
Hi,
I have this C#/ASP.NET/.aspx page with a string variable named myString with the value "Mario Gamito".
How can I access "Mario Gamito" from within a JavaScript function, i. e., the variable's value ?
Already tried '" + mystring + "' but it doesn't works.
Any help would be appreciated.
......
<html>
<head>
<meta name=vs_targetSchema content="http://schemas.microsoft.com/intellisense/ie5">
<title>***WSOFT.NET***</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<!--media=print 这个属性可以在打印时有效-->
<style ......
<mce:script language="javascript" ><!--
function person(name,age)
{
this.name=name;
this.age=age;
}
function man(name,age)
{
this.sex="男";
this.base=person;
this.base(name,age);
}
function woman(name,age)
{
this.sex="女";
this.base=person;
this.base(name,age)
}
......