Type: Posts; User: ypsd

Search: Search took 0.01 seconds.

  1. Can you help create a minimal working example...

    Can you help create a minimal working example (with the complete code) to make a div visible? I don't quite get why empty javascript command can cause changes to the webpage. A working example can...
  2. What is the usage of PDF?

    I've seen some code like the following.

    <a href="javascript:;" title="PDF">PDF</a>

    When I click it if will pop up a div (by changing its style from "display: none;" to "display: block;"...
  3. Replies

    After the above code, Animal.prototype has two...

    After the above code, Animal.prototype has two elements

    constructor: function(name) {
    __proto__: Object

    If I use the second way, prototype will not have constructor anymore. What this...
  4. Replies

    Two way of changing prototype


    I'm always confused about the following way of modifying prototype. Are they the same? Or they slightly different? When to use one vs the other? Thanks!

    var Mammal = function (name) {
  5. Thread: How to use json2?

    by ypsd

    How to use json2?

    I have the following code. I want to convert obj to a JSON string and output it to the document. But my chrome browser doesn't show anything. If I run it in the Chrome Development Tools. The JSON...
  6. Replies

    Difference between onkeydown and onkeypress

    I made the following code to test the difference between onkeydown and onkeypress. I'd expect that if I keep some key pressed, onkeydown will be just triggered once, while onkeypress will be...
  7. Yes. I would like a more general API (probably...

    Yes. I would like a more general API (probably just one simple function call to hide all the details) that can do the conversion correctly for all cases so that I don't have to worry what special...
  8. how to print function body (must be readable) in html?

    f=function(x,y){if(x<y){return x*3;}else{return y*2}}
    document.write("<p>" + f.toString() + "</p>")

    I guess my question is naive. But I ask anyway, as I don't find a good webpage for answering...
  9. This seems to be quite useful to handle multiple...

    This seems to be quite useful to handle multiple browsers. Thanks. I'll try it.
  10. What is the best way to handle multiple browser in javascript?

    Some css tags are different across different browsers. It is a hassle to handle each browser individually. Does anybody have a better to handle multiple browsers for example in the following code?...
  11. Replies

    manpage of javascript

    Some languages have man page available in the command line on linux systems. For bash has 'man bash', perl has 'man perl', which refers to more detailed man pages.

    I'm wondering what is the best...
Results 1 to 11 of 11
HTML5 Development Center

Recent Articles