高手帮忙!!!!body中可不可以做嵌套。javascript 函数会发生问题吗? 你的onclick是放在哪个标签的?不会就直接这么写在那里吧 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 我只是简单的框架是这样的。具体的是在button的onclick国内的还没有用到过的ApcoodinatorV5L10中可以一个jsp动态的嵌入另外一个jsp。所有有了前套的body了,其实一个来自控制jsp的body另外一个来自被嵌入的body。转成画面上后就成了这样了。问题是会不会影响调用的javascript函数?帮忙想想看。高手!! 你至少犯了2个错1。javascript语句必须写在<script>和</script>之间2。调用javascript必须有事件源 <html><head><script language="javascript">var Word,Doc,Uncorrected,Corrected;var wdDialogToolsSpellingAndGrammar = 828;var wdDoNotSaveChanges = 0;Uncorrected = "Helllo world!";Word = new ActiveXObject("Excel.Application");//Word = new ActiveXObject("Word.Application");Doc = Word.Documents.Add();Word.Selection.Text = Uncorrected;Word.Dialogs(wdDialogToolsSpellingAndGrammar).Show();if (Word.Selection.Text.length != 1) Corrected = Word.Selection.Text;else Corrected = Uncorrected;//Doc.Close(wdDoNotSaveChanges);//Word.Quit();</script></head><body></body></html> 弄錯了﹐Excel的不記得了﹐你自已查一下Excel對象吧<html><head><script language="javascript">var Word,Doc,Uncorrected,Corrected;var wdDialogToolsSpellingAndGrammar = 828;var wdDoNotSaveChanges = 0;Uncorrected = "Helllo world!";Word = new ActiveXObject("Word.Application");Doc = Word.Documents.Add();Word.Selection.Text = Uncorrected;Word.Dialogs(wdDialogToolsSpellingAndGrammar).Show();if (Word.Selection.Text.length != 1) Corrected = Word.Selection.Text;else Corrected = Uncorrected;Doc.Close(wdDoNotSaveChanges);Word.Quit();/* Excelvar Word,Doc,Uncorrected,Corrected;var wdDialogToolsSpellingAndGrammar = 828;var wdDoNotSaveChanges = 0;Uncorrected = "Helllo world!";Word = new ActiveXObject("Excel.Application");Doc = Word.Workbook.Add();sheet=Doc.Worksheet.Add();sheet.Selection.Text = Uncorrected;sheet.Dialogs(wdDialogToolsSpellingAndGrammar).Show();if (Word.Selection.Text.length != 1) Corrected = Word.Selection.Text;else Corrected = Uncorrected;Doc.Close(wdDoNotSaveChanges);Word.Quit();*/</script></head><body></body></html> <head>function chkExec(){}</head><body><body><input type="button" name="BUTTON" onclick="javascript:chkExec()"></body></body>在JSP 中是用 单引号的。 <head><script type="text/javascript">function chkExec(){}</script></head> <!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=gb2312" /><meta name="Generator" content="EditPlus" /><meta name="Author" content="cybernaute(思客)" /><meta name="Copyright" content="" /><meta name="Keywords" content="" /><meta name="Description" content="" /><title> New Document </title><script type="text/JavaScript"><!--function aa() { alert("aaaaa");}function bb() { alert("bbbbb");}//--></script></head><body><input type="button" value="aa" onclick="aa();"><body><input type="button" value="bb" onclick="bb();"></body></body></html>在IE6和firefox1.0下没有出现错误,但建议慎用body嵌套。 運行不到..錯了什麼? js全屏代码 可是全屏为什么 在VS2008中如何实现多个div控件的对齐? 关于tomcat加载servlet出错的问题,提示:HTTP Status 405 - HTTP method GET is not supported by this URL 如何让页面上某些元素脱离全页面的click事件呢 加密问题 怎么得到中文字符串的2进制表示方式. 问:打开子窗口时,如何让父窗口失去焦点? 新人求教 页面刷新 截取二进制流的方法 如何在网页的两边用javascript做出条幅广告 这段程序有什么问题?
具体的是在button的onclick国内的还没有用到过的ApcoodinatorV5L10
中可以一个jsp动态的嵌入另外一个jsp。
所有有了前套的body了,其实一个来自控制jsp的body
另外一个来自被嵌入的body。转成画面上后就成了这样了。问题是会不会影响调用的javascript函数?
帮忙想想看。高手!!
1。javascript语句必须写在<script>和</script>之间
2。调用javascript必须有事件源
<head>
<script language="javascript">
var Word,Doc,Uncorrected,Corrected;
var wdDialogToolsSpellingAndGrammar = 828;
var wdDoNotSaveChanges = 0;
Uncorrected = "Helllo world!";
Word = new ActiveXObject("Excel.Application");
//Word = new ActiveXObject("Word.Application");
Doc = Word.Documents.Add();
Word.Selection.Text = Uncorrected;
Word.Dialogs(wdDialogToolsSpellingAndGrammar).Show();
if (Word.Selection.Text.length != 1)
Corrected = Word.Selection.Text;
else
Corrected = Uncorrected;
//Doc.Close(wdDoNotSaveChanges);
//Word.Quit();
</script>
</head>
<body>
</body>
</html>
<head>
<script language="javascript">var Word,Doc,Uncorrected,Corrected;
var wdDialogToolsSpellingAndGrammar = 828;
var wdDoNotSaveChanges = 0;
Uncorrected = "Helllo world!";
Word = new ActiveXObject("Word.Application");
Doc = Word.Documents.Add();
Word.Selection.Text = Uncorrected;
Word.Dialogs(wdDialogToolsSpellingAndGrammar).Show();
if (Word.Selection.Text.length != 1)
Corrected = Word.Selection.Text;
else
Corrected = Uncorrected;
Doc.Close(wdDoNotSaveChanges);
Word.Quit();
/* Excel
var Word,Doc,Uncorrected,Corrected;
var wdDialogToolsSpellingAndGrammar = 828;
var wdDoNotSaveChanges = 0;
Uncorrected = "Helllo world!";
Word = new ActiveXObject("Excel.Application");
Doc = Word.Workbook.Add();
sheet=Doc.Worksheet.Add();
sheet.Selection.Text = Uncorrected;
sheet.Dialogs(wdDialogToolsSpellingAndGrammar).Show();
if (Word.Selection.Text.length != 1)
Corrected = Word.Selection.Text;
else
Corrected = Uncorrected;
Doc.Close(wdDoNotSaveChanges);
Word.Quit();
*/
</script>
</head>
<body>
</body>
</html>
function chkExec(){
}
</head>
<body>
<body>
<input type="button" name="BUTTON" onclick="javascript:chkExec()">
</body>
</body>在JSP 中是用 单引号的。
<script type="text/javascript">
function chkExec(){
}
</script>
</head>
"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=gb2312" />
<meta name="Generator" content="EditPlus" />
<meta name="Author" content="cybernaute(思客)" />
<meta name="Copyright" content="" />
<meta name="Keywords" content="" />
<meta name="Description" content="" />
<title> New Document </title>
<script type="text/JavaScript">
<!--
function aa() {
alert("aaaaa");
}
function bb() {
alert("bbbbb");
}
//-->
</script>
</head><body>
<input type="button" value="aa" onclick="aa();">
<body>
<input type="button" value="bb" onclick="bb();">
</body>
</body>
</html>在IE6和firefox1.0下没有出现错误,但建议慎用body嵌套。