View previous topic :: View next topic |
Author |
Message |
yidabu
Joined: 21 Apr 2007 Posts: 87
|
Posted: Sun Mar 30, 2008 6:56 pm Post subject: get and update value |
|
|
I tested today, the result is (not finished):
Code: | get recently value:
input
value = elementText
value = innerText
plaintext
value = ele.value.toString
value = ele["value"] //nothing
value = ele.elementText //nothing
textarea
value = ele.value.toString
value = ele.elementText //nothing
value = ele.innerText //nothing
value = ele["value"] //nothing
set and update value to Window
input
ele.innerText = newvalue
ele.value = HJson(newvalue) //some times unknow behavior
ele.attribute("value", newvalue) //failed
plaintext
ele.value = HJson(newvalue)
ele.innerText = newvalue //failed
ele.attribute("value", newvalue) //failed
textarea
ele.value= HJson(newvalue)
ele.innerText = newvalue //failed
ele.attribute("value", newvalue) //failed |
for input, get and update value by innerText
for plaintext and textarea, get value by ele.value.toString, update value by HJson(newvalue) _________________ D yuyan |
|
Back to top |
|
|
bobef
Joined: 05 Jun 2005 Posts: 269
|
Posted: Mon Mar 31, 2008 12:57 am Post subject: |
|
|
I have found some inconsistent behavior in HTMLayout but I haven't figured out exactly how it works. For example you can use .innerHTML on text fields, but if they are not attached to the DOM you can't. Then you need to set the value attribute. Or some case like that. |
|
Back to top |
|
|
yidabu
Joined: 21 Apr 2007 Posts: 87
|
Posted: Mon Mar 31, 2008 5:01 am Post subject: |
|
|
It's HTMLayout thing, not the D wrapper, I know _________________ D yuyan |
|
Back to top |
|
|
|