<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0084)http://hi.baidu.com/%C7%E0%B4%BA%D3%D5%BB%F3/blog/item/d445708a2282e81ac8fc7a8b.html -->
<!--STATUS OK--><HTML><HEAD><TITLE>Visual C#中用WMI控制远程计算机_青春诱惑</TITLE>
<META http-equiv=content-type content="text/html; charset=gb2312">
<STYLE type=text/css>.error {
FONT-SIZE: 12px; COLOR: #ff0000
}
</STYLE>
<SCRIPT src="Visual C#中用WMI控制远程计算机_青春诱惑.files/global.js"
type=text/javascript></SCRIPT>
<SCRIPT language=javascript
src="Visual C#中用WMI控制远程计算机_青春诱惑.files/popup.js"></SCRIPT>
<SCRIPT src="Visual C#中用WMI控制远程计算机_青春诱惑.files/BdEditor-mined.js"
type=text/javascript></SCRIPT>
<SCRIPT language=JavaScript
src="Visual C#中用WMI控制远程计算机_青春诱惑.files/g_spjs.js"></SCRIPT>
<SCRIPT language=javascript>
<!--
var allkey="";
var i=0;
var flag=0;
function setpv(allnum)
{
var num = allnum.split('_');
document.getElementById("result").innerHTML=num[0];
}
function checkMail(s)
{
var pattern=/\w+@\w+\.[a-z]+/;
if(pattern.test(s))
{
return true;
}
else
{
return false;
}
}
function checkeandu(eanduid)
{
var eanduvalue=G(eanduid).value;
var len=bytes(eanduvalue);
if(len>128)
{
showErr(2,"您输入的网址或邮箱太长,请保持在128字节以内。");
return false;
}
else
{
return true;
}
}
function cmtdel(str)
{
var pop=new Popup({ contentType:3,isReloadOnClose:false,width:340,height:80});
pop.setContent("title","删除评论");
pop.setContent("confirmCon","您确定要彻底删除这条评论吗?");
pop.setContent("callBack",delCallback2);
pop.setContent("parameter",{fid:str,popup:pop});
pop.build();
pop.show();
return false;
}
function delCallback2(para)
{
var o_pop=para["popup"];
o_pop.config.contentType=1;
o_pop.setContent("contentUrl","");
o_pop.reBuild();
G(para["fid"]).target=o_pop.iframeIdName;
eval("document."+para["fid"]).submit();
}
String.prototype.byteLength = function() {
return this.replace(/[^\u0000-\u007f]/g,"\u0061\u0061").length;
}
function checkname(strid)
{
var ele=document.getElementById(strid);
var len=bytes(ele.value);
if(len>49)
{
showErr(1,"您输入的姓名太长,请保持在49字节以内。");
return false;
}
else
{
if(len==0)
{
document.getElementById(strid).value="匿名网友";
}
return true;
}
}
function checktext(textid)
{
var tempStr='';
var isLightFont=false;
if(editor&&textid=="spBlogCmtText"){
//document.getElementById("spBlogCmtText").value=editor.getHtml();
tempStr=editor.getHtml();
tempStr=tempStr.replace(/<span style="filter:glow\(color=#([0-9a-z]{3,6}),strength=2\);height:0px;color:#([0-9a-z]{3,6})">/ig,'');
tempStr=tempStr.replace(/<\/span>/ig,'');
document.getElementById("spBlogCmtText").value=tempStr;
isLightFont=!(tempStr==editor.getHtml());
}
document.getElementById(textid).value=trimlr(textid);
var str=trimrn(textid);
len=str.length;
if(len==0 || ((/^[\s, ]+$/gi).test(str)) )
{
showErr(3,"您必须输入评论内容,请检查。");
return false;
}
else
{
len=str.byteLength();
var maxLength=isLightFont?916:1000;
if(len > maxLength)
{
showErr(3,"您输入的评论内容太长,请保持在500字以内。");
return false;
}
if(editor&&textid=="spBlogCmtText"){
document.getElementById("spBlogCmtText").value=editor.getHtml();
document.getElementById(textid).value=trimlr(textid);
}
return true;
}
}
function showErr(index,str)
{
G(index+"_err").style.display="";
G(index+"_err_con").innerHTML=str;
}
function hidErr(index)
{
G(index+"_err").style.display="none";
G(index+"_err_con").innerHTML="";
}
function alertPop(tit,con)
{
var pop=new Popup({ contentType:4,isReloadOnClose:false,width:340,height:80});
pop.setContent("title",tit);
pop.setContent("alertCon",con);
pop.build();
pop.show();
}
function cmtfull()
{
var cnum=0;
if(cnum>=50000)
{
alertPop("发表评论","单篇日志评论数最多为50000条.");
return false;
}
else
{
return true;
}
}
function checkcmtform()
{
if(checkname("spBlogCmtor")&&checkeandu("spBlogCmtURL")&&checktext("spBlogCmtText")&&cmtfull())
{
submitForm();
return true;
}
else
{
return false;
}
}
var g_pop=null;
function submitForm()
{
g_pop=new Popup({ contentType:1,isReloadOnClose:false,width:340,height:80});
g_pop.setContent("title","添加评论");
g_pop.setContent("contentUrl","");
g_pop.setContent("someDisabledBtn","btn_ok");
g_pop.build();
G("popFormSubmit").target=g_pop.iframeIdName;
g_pop.show();
}
function g_close_pop()
{
g_pop.close();
}
function formatonlinpic()
{
var picobj=document.getElementsByName("onlinepic");
var picnum=picobj.length;
for(var i=0;i<picnum;i++)
{
if(picobj[i].width>200)
{
picobj[i].width=200;
}
if(picobj[i].height>200)
{
picobj[i].height=200;
}
}
try{document.getElementById("btn_ok").disabled = "";}catch(e){}
}
function addToFavor(){
var blogTitle='Visual C#中用WMI控制远程计算机'.replace(/'/g,'\'');
window.open('http://cang.baidu.com/do/add?it='+encodeURIComponent(blogTitle+'_百度空间')+'&iu='+encodeURIComponent(location.href)+'&fr=sp#nw=1','_s','scrollbars=no,width=600,height=450,right=75,top=20,status=no,resizable=yes');
return false;
}
var isIE = /*@cc_on!@*/false;
function tracker(did,a){
return function(){
var t=new Date().getTime();
var href=a.href;
if(isIE){
var r = /href\s*=\s*("|')?([^\s]*)\1/gi;
if(r.test(a.outerHTML))
href = RegExp.$2;
}
new Image().src = "http://hi.baidu.com/sys/statlog/1.gif?m=" + did + "&v=" + encodeURIComponent(href) + "&c=" + encodeURIComponent(location.href) + "&t="+t;
}
}
function tracker_init(did){
var _s=document.getElementById(did);
var as = _s.getElementsByTagName('A');
for(var i = 0, j = as.length; i < j; i ++){
var a = as[i];
if(isIE){
a.attachEvent("onclick", tracker(did,a));
}else{
a.addEventListener("click", tracker(did,a), false);
}
}
}
/* some functions for cmt-reply */
function cmtreply(cmtName,cmtPorID)
{
window.location.hash="#send";
var cmtForm=document.form1;
cmtForm.cm.value="3";
if(!cmtForm.spReferTarget)
{
var ipt=document.createElement("input");
ipt.type="hidden";
ipt.name="spReferTarget";
ipt.value=cmtPorID;
cmtForm.appendChild(ipt);
}else cmtForm.spReferTarget.value=cmtPorID;
//G("reTitle").innerHTML="回复"+cmtName+":";
G("cancleReLink").style.display="";
cmtForm.btn_ok.value="回复评论";
try{
editor.window.focus();
editor.window.document.body.innerHTML="回复"+cmtName+":";
var w = editor.window;
if(w.getSelection){
var d = w.document;
var s = w.getSelection();
var r = d.createRange();
r.setStartAfter(d.body.firstChild);
r.setEndAfter(d.body.lastChild);
s.removeAllRanges();
s.addRange(r);
}
}catch(e){
try{
cmtForm.getElementsByTagName("textarea")[0].focus();
cmtForm.getElementsByTagName("textarea")[0].value="回复"+cmtName+":";
}catch(e){}
}
}
function canclereply()
{
var cmtForm=document.form1;
cmtForm.cm.value="1";
try{cmtForm.removeChild(cmtForm.spReferTarget);}catch(e){}
/*
try{
var cmt=cmtForm.getElementsByTagName("textarea")[0]
cmt.value="";
cmt.focus();
}catch(e){}
*/
try{
var ed=editor.window.document.body;
ed.innerHTML="";
editor.window.focus();
}catch(e){
var cmt=cmtForm.getElementsByTagName("textarea")[0];
cmt.value="";
cmt.focus();
}
G("cancleReLink")
评论0