Skip to content

Instantly share code, notes, and snippets.

View tonystaark's full-sized avatar

Tony Ng tonystaark

  • Kuala Lumpur, Malaysia
View GitHub Profile
If you want to clear something after you insert an input value; set inputtext.value = ''
If you want elements like buttons/images to appear on different line in HTML, <div> to separate into lines
If you want to change certain index, you can access it like changeTodoPositionInput.value but .value will return string; but you can do .valueAsNumber, to make it number
changeTodo: function(){
var changeTodoPositionInput = document.getElementById('changeTodoPositionInput')
var changeTodoTextInput = document.getElementById('changeTodoTextInput')
todoList.changeTodo(changeTodoPositionInput.valueAsNumber, changeTodoTextInput.value)
}
One method of listing <ul><li></li></ul>
/ means the root of the current drive;
./ means the current directory;
../ means the parent of the current directory.