python每次处理一个字符的三种方法 a_string = "abccdea" print 'the first' for c in a_string: print ord(c)+1 print "the second" result = [ord(c)+1 for c in a_string] print result print "the thrid" def do_something(c): return ord(c)+1 result
共用代码: <div id="div">this is a div</div> var div=document.getElementById('div'); 第一种:用cssText div.style.cssText='width:250px;height:250px;border:1px red solid;'; 第二种:用setProperty() div.style.setProperty('width','250px'); div.style.set