本文整理汇总了Python中pyjamas.DOM.removeAttribute方法的典型用法代码示例。如果您正苦于以下问题:Python DOM.removeAttribute方法的具体用法?Python DOM.removeAttribute怎么用?Python DOM.removeAttribute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyjamas.DOM
的用法示例。
在下文中一共展示了DOM.removeAttribute方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setCellHorizontalAlignment
# 需要导入模块: from pyjamas import DOM [as 别名]
# 或者: from pyjamas.DOM import removeAttribute [as 别名]
def setCellHorizontalAlignment(self, widget, align):
td = self.getWidgetTd(widget)
if td is not None:
if align is None:
DOM.removeAttribute(td, "align")
else:
DOM.setAttribute(td, "align", align)
示例2: setBorderWidth
# 需要导入模块: from pyjamas import DOM [as 别名]
# 或者: from pyjamas.DOM import removeAttribute [as 别名]
def setBorderWidth(self, width):
if width is None:
DOM.removeAttribute(self.tableElem, "border")
else:
DOM.setAttribute(self.tableElem, "border", str(width))
示例3: setBorderWidth
# 需要导入模块: from pyjamas import DOM [as 别名]
# 或者: from pyjamas.DOM import removeAttribute [as 别名]
def setBorderWidth(self, width):
if width is None or width == "":
DOM.removeAttribute(self.table, "border")
else:
DOM.setAttribute(self.table, "border", "%d" % width)
示例4: setPadding
# 需要导入模块: from pyjamas import DOM [as 别名]
# 或者: from pyjamas.DOM import removeAttribute [as 别名]
def setPadding(self, padding):
self.padding = padding
if padding is None:
DOM.removeAttribute(self.table, "cellPadding")
else:
DOM.setAttribute(self.table, "cellPadding", str(padding))
示例5: setSpacing
# 需要导入模块: from pyjamas import DOM [as 别名]
# 或者: from pyjamas.DOM import removeAttribute [as 别名]
def setSpacing(self, spacing):
self.spacing = spacing
if spacing is None:
DOM.removeAttribute(self.table, "cellSpacing")
else:
DOM.setAttribute(self.table, "cellSpacing", str(spacing))
示例6: setCellWidth
# 需要导入模块: from pyjamas import DOM [as 别名]
# 或者: from pyjamas.DOM import removeAttribute [as 别名]
def setCellWidth(self, widget, width):
td = DOM.getParent(widget.getElement())
if width is None:
DOM.removeAttribute(td, "width")
else:
DOM.setAttribute(td, "width", str(width))
示例7: setCellHeight
# 需要导入模块: from pyjamas import DOM [as 别名]
# 或者: from pyjamas.DOM import removeAttribute [as 别名]
def setCellHeight(self, widget, height):
td = DOM.getParent(widget.getElement())
if height is None:
DOM.removeAttribute(td, "height")
else:
DOM.setAttribute(td, "height", str(height))