[Javascript] cant create a button with a label

judah judah at drumbeatinsight.com
Tue Mar 29 21:31:27 CST 2005


thank you! that works too. why do i want to use the other method?

amol k wrote:

>Replace 
>var button = document.createElement("button");
>with 
>var button = document.createElement("input");
>and it should work.
>
>Amol Katdare
>
>On Tue, 29 Mar 2005 06:58:54 -0600, judah <judah at drumbeatinsight.com> wrote:
>  
>
>>I can't create a button with a label. What am I doing wrong?
>>
>>function createButton() {
>>   var button = document.createElement("button");
>>   button.value = "Hello Kitty1";
>>   button.label = "Hello Kitty2";
>>   button.style.label = "Hello Kitty3";
>>   button.style.value = "Hello Kitty4";
>>   button.name = "Hello Kitty5";
>>   button.text = "Hello Kitty6";
>>   button.type = "button";
>>   button.id = "hello";
>>   button.style.width = 120+"px";
>>   button.style.height = 20 + "px";
>>   document.body.appendChild(button);
>>}
>>
>>Judah
>>
>>--
>>No virus found in this outgoing message.
>>Checked by AVG Anti-Virus.
>>Version: 7.0.308 / Virus Database: 266.8.4 - Release Date: 3/27/2005
>>
>>_______________________________________________
>>Javascript mailing list
>>Javascript at LaTech.edu
>>https://lists.LaTech.edu/mailman/listinfo/javascript
>>
>>    
>>
>_______________________________________________
>Javascript mailing list
>Javascript at LaTech.edu
>https://lists.LaTech.edu/mailman/listinfo/javascript
>
>
>  
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20050329/0a48b83e/attachment.htm>
-------------- next part --------------
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.8.4 - Release Date: 3/27/2005


More information about the Javascript mailing list