我想做一个页面,通过javascript读取url传递的值,然后再赋给<object>中的某个param的value,我写了部分代码(如下),求大神帮我改改吧!
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>
<body>
<object id = "viewer"
classid = "clsid:A662DA7E-CCB7-4743-B71A-D817F6D575DF"CODEBASE="http://www.autodesk.com/global/dwfviewer/installer/DwfViewerSetup.cab"
border = "1"
width = "1280"
height = "800">
<param name="Src" value="">
</object>
<script language="javascript">
function change()
{
viewer.Src="mydwf.dwf";
window.onload=change();
}
</script>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>
<body>
<object id = "viewer"
classid = "clsid:A662DA7E-CCB7-4743-B71A-D817F6D575DF"CODEBASE="http://www.autodesk.com/global/dwfviewer/installer/DwfViewerSetup.cab"
border = "1"
width = "1280"
height = "800">
<param name="Src" value="">
</object>
<script language="javascript">
function change()
{
viewer.Src="mydwf.dwf";
window.onload=change();
}
</script>
</body>
</html>
