如果在CHtmlDialog中调用Javascript函数
// 调用页面的刷新方法
IHTMLWindow2* pWindow;
IHTMLDocument2* pDocument;
HRESULT hr = GetDHtmlDocument(&pDocument);
hr = pDocument->get_parentWindow(&pWindow);
if( pWindow)
{
VARIANT ret;
ret.vt = VT_EMPTY;
CString sFunc = _T("RefreshFileForClient()");
CString sLang = _T("javascript");
hr = pWindow->execScript(sFunc.AllocSysString(), sLang.AllocSysString(), &ret);
}
相关文档:
[转帖]JavaScript窗体大小
网页可见区域宽:document.body.clientWidth
网页可见区域高:document.body.clientHeight
网页可见区域宽:document.body.offsetWidth (包括边线的宽)
网页可见区域高:document.body.offsetHeight (包括边线的宽)
网页正文全文宽:document.body.scrollWidth
网页正文全文高:docume ......
http://css-tricks.com/creating-a-slick-auto-playing-featured-content-slider/
demo:http://css-tricks.com/examples/FeaturedContentSlider/
Featured Content Slider Using jQuery
http://demo.webdeveloperplus.com/featured-content-slider/ ......
页面一:
<html>
<head>
<title> 验证与提交一 </title>
<script>
function focusSelect(ID) //当验证不能通过时获得验证控件的焦点和内容
{
document.getElementById(I ......
ZT:http://www.ruanyifeng.com/blog/2010/05/object-oriented_javascript_inheritance.html
上一次的文章,主要介绍了如何"封装"数据和方法,从原型对象生成实例。
今天要介绍的是,多个原型对象之间如何"继承"。
比如,现在有一个"动物"对象,
function Animal(){
this.species = "动物";
}
还有 ......
最近编写Javascript代码。起初没管那么多。一阵狂写。代码写得差不多了。结果上百K文件几十个。当然 没办法需要压缩了。为了速度。
找压缩工具。弄了下。结果错误一大堆。最后才发现是自己写的代码不规范导致的。检查了半天修正了几十个地方。终于能压缩了。
下面总结下需要注意的地方
1、对象结尾 function结尾 最 ......