麻辣堂|资源主站|开发论坛|在线手册
首页 Apache Linux Java MySQL 注册帮助 
PHP项目开发组是PHP开发资源网于2007组年建成立的项目开发团队,目前核心开发成员有27人, 项目协作成员8名.下设7个开发组,主要承接大/中型网站项目开发任务。

    由于开发任务较多,人员比较紧张,现面向社会招聘全职或者兼职开发人员,不管你是在校大学生,还是全职开发人员,以及SOHO都可以联系本站,我们可以长期合作,并为您带来丰厚的报酬。
  您现在的位置:PHP开发资源网 > 麻辣堂 > 详细资料
待解决
向高手请教两个别人程序的问题
悬赏分:20 - 2007年08月18日

我在看一个关于像我们的发帖子实现功能差不多的程序代码,可是有一些地方看不懂,还请各位大哥给以指点啊,我都研究了好几天了,才有一知半解啊!下面是不太明白的地方啊。
哪位大哥能为小弟解决下面的困惑啊,并且下面每个函数的具体作用什么什么啊?
这个函数在初始化编辑窗口时就调用了啊。
function _CState()
{
this.selection = null
this.bMode = true
this.customButtons = false (1)这里什么意思啊
this.css = this.bgColor = ""
this.defaultSkin = document.styleSheets.skin.cssText
this.popupSkin = document.styleSheets.popupSkin.cssText
this.aLinks = new Array()
this.szSearch = location.search.substring(1) (2)这里获得URL的问号后的内容有什么用啊
this.aBindings = new Array()
this.aListPopups = new Object()
this.aCache = new Object()  (3)这里新创建的对象是不是在缓存里啊
this.RestoreSelection = _CState_RestoreSelection
this.GetSelection = _CState_GetSelection
this.SaveSelection = _CState_SaveSelection
}

这个函数的主要作用是什么啊
function insertHTML(szHTML)
{
var sType
var sel = g_state.GetSelection()
sType = sel.type
if (g_state.bMode) {
if (sType=="Control") (4)这是城什么意思啊
sel.item(0).outerHTML = szHTML (5)这晨item(0)这个函数是系统的吗,他是指对象的什么啊
else
sel.pasteHTML(szHTML) (6)这里的object.pasteHTML是系统函数吗?其用法怎么用啊?
}
else
sel.text = szHTML
}
下面这三个函数分不清什么区别啊
function _CState_RestoreSelection() //看字面意思是重存选择
{
if (this.selection) this.selection.select()
}
function _CState_GetSelection()  //获得选择
{
var oSel = this.selection
if (!oSel) {
oSel = idEditbox.document.selection.createRange()
oSel.type = idEditbox.document.selection.type
}
return oSel
}

function _CState_SaveSelection()   (8)保存选择它和上面的获得选择有什么区别啊
{
g_state.selection = idEditbox.document.selection.createRange()
g_state.selection.type = idEditbox.document.selection.type
}

下面这个函数什么意思啊,
function _CPopupRenderer_ResetContext(oDoc)
{
this.oDocument = oDoc
this.elCurrent = null
if (this.szType=="Table") {
var oSel = idEditbox.document.selection.createRange()  (9)createRange()不是创建热区吗,这里怎么把这个热区赋给了对象呢
var oBlock = (oSel.parentElement != null ? _CUtil_GetElement(oSel.parentElement(),"TABLE") : _CUtil_GetElement(oSel.item(0),"TABLE")) 这里用到的函数下面附上
if (oBlock!=null) {
oDoc.all.tabEdit.className=""
oDoc.all.tabEditBodytxtPadding.value = oBlock.cellPadding
oDoc.all.tabEditBodytxtSpacing.value = oBlock.cellSpacing
oDoc.all.tabEditBodytxtBorder.value = oBlock.border
oDoc.all.tabEditBodytxtBorderColor.value = oBlock.borderColor
oDoc.all.tabEditBodytxtBackgroundImage.value = oBlock.background
oDoc.all.tabEditBodytxtBackgroundColor.value = oBlock.bgColor
}
oDoc.elCurrent = oBlock
}
}
function _CUtil_GetElement(oEl,sTag)//辨别是否与其标识一致,并作出不同的处理?
{
while (oEl!=null && oEl.tagName!=sTag)
oEl = oEl.parentElement
return oEl
}

提问者:caolf2006   08-18 09:09
答复
路过。。。顺便帮顶:)
回答者:玉米づ冰冻可乐 - 瓦岗村民 8-22 09:10
我也来回答:
不管你有没有帮助我们,瓦岗寨8万村民将感谢你。。。。。

为防止灌水,您需要计算一道数学题: 答案:
32 + 92 = ? 请将计算结果填在上面

 
[]
©2007 PhpRes.COM