×

python中的dir是什么意思 he python

python的dir和help用法?checkbox复选框某个被选中触发的事件名是什么

admin admin 发表于2022-05-26 19:05:14 浏览112 评论0

抢沙发发表评论

python的dir和help用法


dir和help是Python中两个强大的built-in函数,就像Linux的man一样,绝对是开发的好帮手。比如查看list的所以属性:
dir(list)
输出:
[’__add__’, ’__class__’, ’__contains__’, ’__delattr__’, ’__delitem__’, ’__delslice__’, ’__doc__’, ’__eq__’, ’__format__’, ’__ge__’, ’__getattribute__’, ’__getitem__’, ’__getslice__’, ’__gt__’, ’__hash__’, ’__iadd__’, ’__imul__’, ’__init__’, ’__iter__’, ’__le__’, ’__len__’, ’__lt__’, ’__mul__’, ’__ne__’, ’__new__’, ’__reduce__’, ’__reduce_ex__’, ’__repr__’, ’__reversed__’, ’__rmul__’, ’__setattr__’, ’__setitem__’, ’__setslice__’, ’__sizeof__’, ’__str__’, ’__subclasshook__’, ’append’, ’count’, ’extend’, ’index’, ’insert’, ’pop’, ’remove’, ’reverse’, ’sort’]
然后查看list的pop方法的作用和用法:
help(list.pop)
输出:
Help on method_descriptor:
pop(...)
    L.pop([index]) -》 item -- remove and return item at index (default last).
    Raises IndexError if list is empty or index is out of range.
(END)

checkbox复选框某个被选中触发的事件名是什么


若被选中,复选框的checked属性为true,没有选中为false。
可以判断这个属性真假来实现你想要的结果。

onChanged事件checkbox中不可用,可以用onclick事件配合checkbox的checked属性来使用。

例如
function check(){
if(document.myfrom.mybox.checked==true){
alert(“选中“);
}else{
alert(“没有选中“);
}
}

《form name=“myfrom“ action=““ method=“post“》
《input type=“checkbox“ name=“mybox“ id=“mybox“ value=“选中“ onclick=“check();“ /》选中
《/form》

看得起的近义词


这个是在词林在线词典查的看得起的近义词大全
1看得起
近义词
法语:apprécier, estimer, tenir qn en estime, avoir bonne opinion de qn, faire cas de qn
反义词
汉语:瞧不起, 看不起
2重视
近义词
汉语:重视, 珍视, 珍惜, 尊重, 看重, 倚重, 器重, 注重, 推崇, 赏识, 青睐, 垂青, 讲究, 重, 器, 厚, 看得起, 瞧得起, 另眼看待, 另眼相看, 刮目相看, 刮目相待, 敝帚自珍, 敝帚千金, 侧重, 强调, 偏重, 垂爱, 仰观, 讲求
英语:pay attention to, take into account, treasure, value
德语:berücksichtigt, bewerten, schätzen, Wertschätzung, berücksichtigen
法语:attacher de l’importance à, faire grand cas de
反义词
汉语:蔑视, 忽视, 藐视, 小看, 轻蔑, 轻视, 鄙弃, 漠视, 鄙视
-python