Write JavaScript in an External File

Amit Sharma
Updated on 13-Jun-2020 06:16:27

8K+ Views

Create external JavaScript file with the extension .js. After creating, add it to the HTML file in the script tag. The src attribute is used to include that external JavaScript file.If you have more than one external JavaScript file, then add it in the same web page to increase performance of the page.Let’s say the following new.js is our external JavaScript file −function display() {    alert("Hello World!"); }Now add the external JavaScript file to the HTML web page −                                      

Should I Always Put My JavaScript File in the Head Tag of My HTML File?

Ali
Ali
Updated on 13-Jun-2020 06:14:47

468 Views

You can place the tags, containing your JavaScript, anywhere within your web page, but it is normally recommended that you should keep it within the tag or tag.It’s good for performance to add JavaScript in element. Here’s an example to add under … −                               Here’s an example to add under … −                                        

Why Prefer to Put JavaScript in the Footer of an HTML Page

Rahul Sharma
Updated on 13-Jun-2020 06:13:45

916 Views

With JavaScript, you can put JavaScript anywhere on the page, whether inside or tag. But, it is a good practice to add JavaScript in the footer i.e. just before closing the tag. This is because −It loads script faster.It will not block any DOM content to load.It loads the web page before loading JavaScriptImproves display speedPage loads faster

Change User Settings for Case Sensitivity in SAP 6.0

Giri Raju
Updated on 13-Jun-2020 06:11:30

780 Views

Yes, there are user specific text settings which can let you stroke in Uppercase or lowercase whatever is you choice. Go to ABAP Editor initial screen using T-Code: SE38You need to go settings under utilities tab. With utilities select ABAP editor tab. Once you have selected ABAP editor tab, select pretty printer section. You will have a handful of options to choose from.

Error: Type Table is Not an Internal Table in SAP Method

Abhinanda Shri
Updated on 13-Jun-2020 06:08:18

2K+ Views

You need to define the et_flights parameter as of type SFLIGHT. As per method defined, you have this type as structure type and also declare transparent table SFLIGHT at the same time.You should use an already available dictionary table type with row structure of SFLIGHT for et_flight.You should declare et_flights inside the method in class definition as a private member or as a return value of the method.class myclass definition.    public section.    types ty_mytable type standard table of sflight.    methods mymethod exporting mydata type ty_mytable. endclass. class myclass implementation.     method mymethod.       ... Read More

Estimation of Number of SAP Programs and Factors Deciding It

Paul Richard
Updated on 13-Jun-2020 06:06:07

116 Views

There is no official table as you quoted in your example as there is a number of factors on which estimation depends, for example:a) Programmer experience b) Complexity of code c) Interaction with other interfaces d) Your standard and best practicesYou would require building your own formula/technique based on various factors and map it with current estimation to get more accuracy.

Difference Between datetime.now() and datetime.today() in Python

Rajendra Dharmkar
Updated on 13-Jun-2020 06:04:46

2K+ Views

The function datetime.now() takes tzinfo as keyword argument but datetime.today() does not take any keyword arguments. Quoting the docs −datetime.now() returns the current local date and time. If optional argument tz is None or not specified, this is like today(), but, if possible, supplies more precision than can be gotten from going through a time.time() timestamp (for example, this may be possible on platforms supplying the C gettimeofday() function).

Compare Date Strings in Python

Rajendra Dharmkar
Updated on 13-Jun-2020 06:01:28

1K+ Views

Python date implementations support all the comparision operators. So, if you are using the datetime module to create and handle date objects, you can simply use the , =, etc. operators on the dates. This makes it very easy to compare and check dates for validations, etc.Examplefrom datetime import datetime from datetime import timedelta today = datetime.today() yesterday = today - timedelta(days=1) print(today < yesterday) print(today > yesterday) print(today == yesterday)OutputThis will give the output −False True False

Small Input Group with Bootstrap

Ankith Reddy
Updated on 12-Jun-2020 22:36:13

436 Views

To set small input group with Bootstrap, use the .input-group-sm class.You can try to run the following code to implement the .input-group-sm class &minsu;ExampleLive Demo           Bootstrap Example                                          Search                                                                                                                                                      

Add Red Label with Bootstrap

Anvi Jain
Updated on 12-Jun-2020 22:35:05

605 Views

Use .label-danger class in Bootstrap to add red colored label.You can try to run the following code to implement the .label-danger class −ExampleLive Demo           Bootstrap Example                                          If you find any issues, click below          Danger          

Advertisements